File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
python/plugins/processing/script Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ def getIcon(self):
92
92
return self ._icon
93
93
94
94
def defineCharacteristicsFromFile (self ):
95
+ self .error = None
95
96
self .script = ''
96
97
self .silentOutputs = []
97
98
filename = os .path .basename (self .descriptionFile )
@@ -104,9 +105,8 @@ def defineCharacteristicsFromFile(self):
104
105
try :
105
106
self .processParameterLine (line .strip ('\n ' ))
106
107
except :
107
- raise WrongScriptException (
108
- self .tr ('Could not load script: %s\n '
109
- 'Problem with line: %s' , 'ScriptAlgorithm' ) % (self .descriptionFile , line ))
108
+ self .error = self .tr ('This script has a syntax errors.\n '
109
+ 'Problem with line: %s' , 'ScriptAlgorithm' ) % line
110
110
self .script += line
111
111
line = lines .readline ()
112
112
lines .close ()
@@ -126,6 +126,10 @@ def defineCharacteristicsFromScript(self):
126
126
except :
127
127
pass
128
128
129
+
130
+ def checkBeforeOpeningParametersDialog (self ):
131
+ return self .error
132
+
129
133
def checkInputCRS (self ):
130
134
if self .noCRSWarning :
131
135
return True
You can’t perform that action at this time.
0 commit comments