Skip to content

Commit

Permalink
[processing] better handling of wrong models
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Oct 18, 2014
1 parent de91734 commit 5e9dc03
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions python/plugins/processing/modeler/ModelerAlgorithmProvider.py
Expand Up @@ -82,8 +82,12 @@ def loadFromFolder(self, folder):
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))

0 comments on commit 5e9dc03

Please sign in to comment.