Skip to content

Commit

Permalink
avoid traceback when network offline in add-on check
Browse files Browse the repository at this point in the history
  • Loading branch information
dae committed Feb 27, 2019
1 parent 2e70c56 commit d6915ff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion aqt/addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,13 @@ def onInstallFiles(self, paths=None):
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:
Expand Down

0 comments on commit d6915ff

Please sign in to comment.