From 0adb530dc2831644a4ec446bcc488052b6b3470a Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Tue, 4 Apr 2023 15:34:09 +0000 Subject: [PATCH] Update 'src/gui_qt/lib/utils.py' --- src/gui_qt/lib/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui_qt/lib/utils.py b/src/gui_qt/lib/utils.py index 738524c..2c47dfc 100644 --- a/src/gui_qt/lib/utils.py +++ b/src/gui_qt/lib/utils.py @@ -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'):