Skip to content
Browse files
[processing] more checks before running model
  • Loading branch information
volaya committed Jan 19, 2016
1 parent 4b079ae commit f7623808359b43d42e1c4dad95d1f8feb7c9b07a
@@ -222,9 +222,9 @@ def executeAlgorithm(self):
message = alg.checkBeforeOpeningParametersDialog()
if message:
dlg = MessageDialog()
dlg.setTitle('Missing dependency'))
dlg.setTitle('Error executing algorithm'))
dlg.setMessage('<h3>Missing dependency. This algorithm cannot ''<h3>This algorithm cannot '
'be run :-( </h3>\n%s') % message)
@@ -511,6 +511,12 @@ def commandLineName(self):
return 'modeler:' + os.path.basename(self.descriptionFile)[:-6].lower()

def checkBeforeOpeningParametersDialog(self):
for alg in self.algs.values():
algInstance = ModelerUtils.getAlgorithm(alg.consoleName)
if algInstance is None:
return "The model you are trying to run contains an algorithm that is not available: <i>%s</i>" % alg.consoleName

def setModelerView(self, dialog):
self.modelerdialog = dialog

0 comments on commit f762380

Please sign in to comment.