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

This commit is contained in:
Dominik Demuth 2023-04-04 15:34:09 +00:00
parent d7fd8395e5
commit 0adb530dc2

View File

@ -223,19 +223,19 @@ class Updater:
@staticmethod
@lru_cache(3)
def get_zsync():
url_zsync = f'https://{Updater.host}/{Updater.version}.AppImage.zsync'
url_zsync = self.zsync_url
m_time_zsync = None
checksum_zsync = None
zsync_file = None
filename = None
try:
response = requests.get(url_zsync)
if response.status_code == requests.codes['\o/']:
if response.status_code == 200:
zsync_file = response.content
else:
logger.error(f'Request for zsync returned code {response.status_code}')
except Exception:
logger.exception('Download of zsync failed')
except Exception as :
logger.exception(f'Download of zsync failed with exception {e.args}')
if zsync_file is not None:
for line in zsync_file.split(b'\n'):