[processing] better error capturing when connection to models repo fails

fixes #12515
This commit is contained in:
volaya 2015-06-26 10:00:10 +02:00
parent 21121286f0
commit 38d598008e

View File

@ -106,7 +106,7 @@ class GetModelsAction(ToolboxAction):
dlg.exec_()
if dlg.updateToolbox:
self.toolbox.updateProvider('model')
except HTTPError:
except (HTTPError, URLError):
QMessageBox.critical(iface.mainWindow(),
self.tr('Connection problem', 'GetModelsAction'),
self.tr('Could not connect to scripts/models repository', 'GetModelsAction'))
@ -156,8 +156,8 @@ class GetScriptsAndModelsDialog(BASE, WIDGET):
self.icon = QIcon(os.path.join(pluginPath, 'images', 'r.png'))
self.lastSelectedItem = None
self.populateTree()
self.updateToolbox = False
self.populateTree()
self.buttonBox.accepted.connect(self.okPressed)
self.buttonBox.rejected.connect(self.cancelPressed)
self.tree.currentItemChanged .connect(self.currentItemChanged)