1
0
forked from IPKM/nmreval

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 @staticmethod
@lru_cache(3) @lru_cache(3)
def get_zsync(): def get_zsync():
url_zsync = f'https://{Updater.host}/{Updater.version}.AppImage.zsync' url_zsync = self.zsync_url
m_time_zsync = None m_time_zsync = None
checksum_zsync = None checksum_zsync = None
zsync_file = None zsync_file = None
filename = None filename = None
try: try:
response = requests.get(url_zsync) response = requests.get(url_zsync)
if response.status_code == requests.codes['\o/']: if response.status_code == 200:
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: except Exception as :
logger.exception('Download of zsync failed') logger.exception(f'Download of zsync failed with exception {e.args}')
if zsync_file is not None: if zsync_file is not None:
for line in zsync_file.split(b'\n'): for line in zsync_file.split(b'\n'):