mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[processing] better handling of wrong models
This commit is contained in:
parent
de91734fc8
commit
5e9dc03c7a
@ -82,8 +82,12 @@ class ModelerAlgorithmProvider(AlgorithmProvider):
|
||||
try:
|
||||
fullpath = os.path.join(path, descriptionFile)
|
||||
alg = ModelerAlgorithm.fromFile(fullpath)
|
||||
alg.provider = self
|
||||
self.algs.append(alg)
|
||||
if alg.name:
|
||||
alg.provider = self
|
||||
self.algs.append(alg)
|
||||
else:
|
||||
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
|
||||
self.tr('Could not load model %s', 'ModelerAlgorithmProvider') % descriptionFile)
|
||||
except WrongModelException, e:
|
||||
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
|
||||
self.tr('Could not load model %s\n%s', 'ModelerAlgorithmProvider') % (descriptionFile, e.msg))
|
||||
|
Loading…
x
Reference in New Issue
Block a user