From d6915ff6e827ebf729acc6a55e1a2ff1ddf76fe5 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 27 Feb 2019 14:18:16 +1000 Subject: [PATCH] avoid traceback when network offline in add-on check --- aqt/addons.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/aqt/addons.py b/aqt/addons.py index 78307b518..4020b35b7 100644 --- a/aqt/addons.py +++ b/aqt/addons.py @@ -560,7 +560,13 @@ class AddonsDialog(QDialog): self.redrawAddons() def onCheckForUpdates(self): - updated = self.mgr.checkForUpdates() + try: + updated = self.mgr.checkForUpdates() + except Exception as e: + showWarning(_("Please check your internet connection.") + "\n\n" + str(e), + textFormat="plain") + return + if not updated: tooltip(_("No updates available.")) else: