Skip to content

Commit

Permalink
[processing] Catch AttributeError and TypeError when loading Processi…
Browse files Browse the repository at this point in the history
…ng script algorithms.

Otherwise an error in decorator of one script prevents all scripts from loading.
  • Loading branch information
radosuav authored and nyalldawson committed Jan 29, 2020
1 parent 68cbc5b commit ea0a701
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/plugins/processing/script/ScriptUtils.py
Expand Up @@ -75,7 +75,7 @@ def loadAlgorithm(moduleName, filePath):
o = obj()
scriptsRegistry[o.name()] = filePath
return o
except ImportError as e:
except (ImportError, AttributeError, TypeError) as e:
QgsMessageLog.logMessage(QCoreApplication.translate("ScriptUtils", "Could not import script algorithm '{}' from '{}'\n{}").format(moduleName, filePath, str(e)),
QCoreApplication.translate("ScriptUtils", "Processing"),
Qgis.Critical)
Expand Down

0 comments on commit ea0a701

Please sign in to comment.