From 79befb50f1125f612f9cf84d7da18875d8de3d0f Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Tue, 4 Apr 2023 15:41:21 +0000 Subject: [PATCH] Update 'src/gui_qt/lib/utils.py' --- src/gui_qt/lib/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui_qt/lib/utils.py b/src/gui_qt/lib/utils.py index 2c47dfc..fc90868 100644 --- a/src/gui_qt/lib/utils.py +++ b/src/gui_qt/lib/utils.py @@ -234,7 +234,7 @@ class Updater: zsync_file = response.content else: logger.error(f'Request for zsync returned code {response.status_code}') - except Exception as : + except Exception as e: logger.exception(f'Download of zsync failed with exception {e.args}') if zsync_file is not None: @@ -266,6 +266,8 @@ class Updater: m_time_file = datetime.fromtimestamp(stat_mtime).replace(microsecond=0) with open(filename, 'rb') as f: checksum_file = hashlib.sha1(f.read()).hexdigest() + if checksum_file is None: + logger.warning('No checksum for AppImage calculated') return m_time_file, checksum_file