From d83f81077364b516769a4ef5f96233d6785d9a73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Wed, 1 Feb 2023 22:17:57 +0000 Subject: [PATCH] Pylint fixes. --- lib/sysgeneral.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sysgeneral.py b/lib/sysgeneral.py index 7a41e1c..1938645 100644 --- a/lib/sysgeneral.py +++ b/lib/sysgeneral.py @@ -36,7 +36,7 @@ class SysGeneral: readable_hash = hashlib.sha256(downloaded_content).hexdigest() if expected_hash == readable_hash: return - raise Exception(f"Checksum mismatch for file {os.path.basename(file_name)}:\n\ + raise ValueError(f"Checksum mismatch for file {os.path.basename(file_name)}:\n\ expected: {expected_hash}\n\ actual: {readable_hash}\n\ When in doubt, try deleting the file in question -- it will be downloaded again when running \ @@ -64,7 +64,7 @@ this script the next time") with open(abs_file_name, 'wb') as target_file: target_file.write(response.raw.read()) else: - raise Exception("Download failed.") + raise requests.HTTPError("Download failed.") return abs_file_name def get_packages(self, source_manifest):