From 6a5787abae4420e17843cf0c12119925ce1f4d10 Mon Sep 17 00:00:00 2001 From: Dhinak G <17605561+dhinakg@users.noreply.github.com> Date: Wed, 4 Aug 2021 14:08:07 -0400 Subject: [PATCH] Return checksum in download_file --- Resources/Utilities.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/Utilities.py b/Resources/Utilities.py index 5e5f058bb..543a91b0d 100644 --- a/Resources/Utilities.py +++ b/Resources/Utilities.py @@ -212,7 +212,7 @@ def download_file(link, location): file.write(chunk) count += len(chunk) cls() - print(f"- Downloading package") + print("- Downloading package") print(f"- {count / 1024 / 1024}MB Downloaded") checksum = hashlib.sha256() with location.open("rb") as file: @@ -220,7 +220,7 @@ def download_file(link, location): while chunk: checksum.update(chunk) chunk = file.read(1024 * 1024 * 16) - print(f"- Checksum: {checksum.hexdigest()}") + return checksum # def menu(title, prompt, menu_options, add_quit=True, auto_number=False, in_between=[], top_level=False):