Update 'src/gui_qt/lib/utils.py'

This commit is contained in:
Dominik Demuth 2023-04-04 15:41:21 +00:00
parent 0adb530dc2
commit 79befb50f1

View File

@ -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