@@ -464,8 +464,7 @@ def serialize(self):
464
464
pt = self .algPos [i ]
465
465
s += str (pt .x ()) + ',' + str (pt .y ()) + '\n '
466
466
if len (self .dependencies [i ]) != 0 :
467
- s += ',' .join ([str (index ) for index in self .dependencies [i ]]) \
468
- + '\n '
467
+ s += ',' .join ([str (index ) for index in self .dependencies [i ]]) + '\n '
469
468
else :
470
469
s += str (None ) + '\n '
471
470
for param in alg .parameters :
@@ -517,12 +516,12 @@ def prepareAlgorithm(self, alg, iAlg):
517
516
else :
518
517
value = self .getValueFromAlgorithmAndParameter (aap )
519
518
520
- # We allow unexistent filepaths, since that allows
521
- # algorithms to skip some conversion routines
522
- if not param .setValue (value ) and not isinstance (param ,
523
- ParameterDataObject ):
524
- raise GeoAlgorithmExecutionException ('Wrong value: '
525
- + str (value ))
519
+ # We allow unexistent filepaths, since that allows
520
+ # algorithms to skip some conversion routines
521
+ if not param .setValue (value ) and not isinstance (param ,
522
+ ParameterDataObject ):
523
+ raise GeoAlgorithmExecutionException ('Wrong value: '
524
+ + str (value ))
526
525
for out in alg .outputs :
527
526
if not out .hidden :
528
527
val = self .algOutputs [iAlg ][out .name ]
@@ -579,9 +578,8 @@ def getValueFromAlgorithmAndParameter(self, aap):
579
578
return None
580
579
if float (aap .alg ) \
581
580
== float (AlgorithmAndParameter .PARENT_MODEL_ALGORITHM ):
582
- for key in self .paramValues .keys ():
583
- if aap .param == key :
584
- return self .paramValues [key ]
581
+ if aap .param in self .paramValues .keys ():
582
+ return self .paramValues [aap .param ]
585
583
for param in self .parameters :
586
584
if aap .param == param .name :
587
585
return param .value
0 commit comments