Skip to content

Commit

Permalink
fix: Fix an issue where CLI reported incorrect download (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
titom73 authored May 28, 2024
1 parent 48cbcd9 commit d1ece9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -345,4 +345,5 @@ report.html

*.swp
arista.xml
tester.py
tester.py
*.tgz
12 changes: 6 additions & 6 deletions eos_downloader/object_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,12 @@ def download_local(self, file_path: str, checksum: bool = False) -> bool:
hash_result = self._compute_hash_sh512sum(
file=file_downloaded, hash_expected=hash_expected
)
if not hash_result:
logger.error("Downloaded file is corrupted, please check your connection")
console.print(
"❌ Downloaded file is corrupted, please check your connection"
)
return False
if not hash_result:
logger.error("Downloaded file is corrupted, please check your connection")
console.print(
"❌ Downloaded file is corrupted, please check your connection"
)
return False
logger.info("Downloaded file is correct.")
console.print("✅ Downloaded file is correct.")
return True
Expand Down

0 comments on commit d1ece9e

Please sign in to comment.