Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] show script in toolbox even if it contains errors
  • Loading branch information
volaya committed May 18, 2016
1 parent f001ac1 commit d390ebd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions python/plugins/processing/script/ScriptAlgorithm.py
Expand Up @@ -92,6 +92,7 @@ def getIcon(self):
return self._icon

def defineCharacteristicsFromFile(self):
self.error = None
self.script = ''
self.silentOutputs = []
filename = os.path.basename(self.descriptionFile)
Expand All @@ -104,9 +105,8 @@ def defineCharacteristicsFromFile(self):
try:
self.processParameterLine(line.strip('\n'))
except:
raise WrongScriptException(
self.tr('Could not load script: %s\n'
'Problem with line: %s', 'ScriptAlgorithm') % (self.descriptionFile, line))
self.error = self.tr('This script has a syntax errors.\n'
'Problem with line: %s', 'ScriptAlgorithm') % line
self.script += line
line = lines.readline()
lines.close()
Expand All @@ -126,6 +126,10 @@ def defineCharacteristicsFromScript(self):
except:
pass


def checkBeforeOpeningParametersDialog(self):
return self.error

def checkInputCRS(self):
if self.noCRSWarning:
return True
Expand Down

0 comments on commit d390ebd

Please sign in to comment.