Skip to content

Commit 30a738f

Browse files
committed
[processing] improve handling of the obsolete models (fix #14306)
1 parent 61a92e2 commit 30a738f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

python/plugins/processing/modeler/ModelerAlgorithm.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,14 @@ def _tr(s):
653653
modelAlg.params[param.name] = None
654654
else:
655655
tokens = line.split('|')
656-
algIdx = int(tokens[0])
656+
try:
657+
algIdx = int(tokens[0])
658+
except:
659+
raise WrongModelException(
660+
_tr('Number of parameters in the '
661+
'{} algorithm does not match '
662+
'current Processing '
663+
'implementation'.format(alg.name)))
657664
if algIdx == -1:
658665
if tokens[1] in modelParameters:
659666
modelAlg.params[param.name] = ValueFromInput(tokens[1])

0 commit comments

Comments
 (0)