3434import uuid
3535import importlib
3636import re
37+ import traceback
3738
3839from qgis .PyQt .QtCore import QCoreApplication
3940from qgis .PyQt .QtGui import QIcon
@@ -145,18 +146,14 @@ def defineCharacteristicsFromFile(self):
145146 line = line .strip ('\n ' ).strip ()
146147 if line .startswith ('Hardcoded' ):
147148 self .hardcodedStrings .append (line [len ('Hardcoded|' ):])
148- elif line . startswith ( 'Parameter' ):
149- parameter = getParameterFromString ( line )
149+ parameter = getParameterFromString ( line )
150+ if parameter is not None :
150151 self .addParameter (parameter )
151152 if isinstance (parameter , ParameterVector ):
152153 hasVectorInput = True
153154 if isinstance (parameter , ParameterMultipleInput ) \
154155 and parameter .datatype < 3 :
155156 hasVectorInput = True
156- elif line .startswith ('*Parameter' ):
157- param = getParameterFromString (line [1 :])
158- param .isAdvanced = True
159- self .addParameter (param )
160157 else :
161158 output = getOutputFromString (line )
162159 self .addOutput (output )
@@ -169,9 +166,11 @@ def defineCharacteristicsFromFile(self):
169166 " (raw output)" , "txt" ))
170167 line = lines .readline ().strip ('\n ' ).strip ()
171168 except Exception as e :
169+
172170 ProcessingLog .addToLog (
173171 ProcessingLog .LOG_ERROR ,
174- self .tr ('Could not open GRASS algorithm: %s.\n %s' % (self .descriptionFile , line )))
172+ traceback .format_exc ())
173+ #self.tr('Could not open GRASS algorithm: %s.\n%s' % (self.descriptionFile, line)))
175174 raise e
176175 lines .close ()
177176
0 commit comments