Tell the user (In the About window) if checking for updates failed.

pull/55/head
Rune B. Broberg 2019-10-20 12:29:41 +02:00
rodzic 7d58c1e777
commit d7d4d51bce
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -1611,12 +1611,15 @@ class AboutWindow(QtWidgets.QWidget):
latest_url = updates['url']
except error.HTTPError as e:
logger.exception("Checking for updates produced an HTTP exception: %s", e)
self.updateLabel.setText("Connection error.")
return
except json.JSONDecodeError as e:
logger.exception("Checking for updates provided an unparseable file: %s", e)
self.updateLabel.setText("Data error reading versions.")
return
except error.URLError as e:
logger.exception("Checking for updates produced a URL exception: %s", e)
self.updateLabel.setText("Connection error.")
return
logger.info("Latest version is " + latest_version.version_string)