mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
[processing] better error capturing when connection to models repo fails
fixes #12515
This commit is contained in:
parent
21121286f0
commit
38d598008e
@ -106,7 +106,7 @@ class GetModelsAction(ToolboxAction):
|
|||||||
dlg.exec_()
|
dlg.exec_()
|
||||||
if dlg.updateToolbox:
|
if dlg.updateToolbox:
|
||||||
self.toolbox.updateProvider('model')
|
self.toolbox.updateProvider('model')
|
||||||
except HTTPError:
|
except (HTTPError, URLError):
|
||||||
QMessageBox.critical(iface.mainWindow(),
|
QMessageBox.critical(iface.mainWindow(),
|
||||||
self.tr('Connection problem', 'GetModelsAction'),
|
self.tr('Connection problem', 'GetModelsAction'),
|
||||||
self.tr('Could not connect to scripts/models repository', '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.icon = QIcon(os.path.join(pluginPath, 'images', 'r.png'))
|
||||||
|
|
||||||
self.lastSelectedItem = None
|
self.lastSelectedItem = None
|
||||||
self.populateTree()
|
|
||||||
self.updateToolbox = False
|
self.updateToolbox = False
|
||||||
|
self.populateTree()
|
||||||
self.buttonBox.accepted.connect(self.okPressed)
|
self.buttonBox.accepted.connect(self.okPressed)
|
||||||
self.buttonBox.rejected.connect(self.cancelPressed)
|
self.buttonBox.rejected.connect(self.cancelPressed)
|
||||||
self.tree.currentItemChanged .connect(self.currentItemChanged)
|
self.tree.currentItemChanged .connect(self.currentItemChanged)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user