avoid traceback when network offline in add-on check

This commit is contained in:
Damien Elmes 2019-02-27 14:18:16 +10:00
parent 2e70c56248
commit d6915ff6e8

View File

@ -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: