forked from IPKM/nmreval
Update 'src/gui_qt/lib/utils.py'
This commit is contained in:
parent
0adb530dc2
commit
79befb50f1
@ -234,7 +234,7 @@ class Updater:
|
|||||||
zsync_file = response.content
|
zsync_file = response.content
|
||||||
else:
|
else:
|
||||||
logger.error(f'Request for zsync returned code {response.status_code}')
|
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}')
|
logger.exception(f'Download of zsync failed with exception {e.args}')
|
||||||
|
|
||||||
if zsync_file is not None:
|
if zsync_file is not None:
|
||||||
@ -266,6 +266,8 @@ class Updater:
|
|||||||
m_time_file = datetime.fromtimestamp(stat_mtime).replace(microsecond=0)
|
m_time_file = datetime.fromtimestamp(stat_mtime).replace(microsecond=0)
|
||||||
with open(filename, 'rb') as f:
|
with open(filename, 'rb') as f:
|
||||||
checksum_file = hashlib.sha1(f.read()).hexdigest()
|
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
|
return m_time_file, checksum_file
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user