@@ -2197,9 +2197,9 @@ def handle_iterate_opts(self):
21972197 self .log .info ("Current iteration index: %s" , self .iter_idx )
21982198
21992199 # pop first element from all iterative easyconfig parameters as next value to use
2200- for opt in self .iter_opts :
2201- if len (self . iter_opts [ opt ] ) > self .iter_idx :
2202- self .cfg [opt ] = self . iter_opts [ opt ] [self .iter_idx ]
2200+ for opt , value in self .iter_opts . items () :
2201+ if len (value ) > self .iter_idx :
2202+ self .cfg [opt ] = value [self .iter_idx ]
22032203 else :
22042204 self .cfg [opt ] = '' # empty list => empty option as next value
22052205 self .log .debug ("Next value for %s: %s" % (opt , str (self .cfg [opt ])))
@@ -2211,12 +2211,12 @@ def post_iter_step(self):
22112211 """Restore options that were iterated over"""
22122212 # disable templating, since we're messing about with values in self.cfg
22132213 with self .cfg .disable_templating ():
2214- for opt in self .iter_opts :
2215- self .cfg [opt ] = self . iter_opts [ opt ]
2214+ for opt , value in self .iter_opts . items () :
2215+ self .cfg [opt ] = value
22162216
22172217 # also need to take into account extensions, since those were iterated over as well
22182218 for ext in self .ext_instances :
2219- ext .cfg [opt ] = self . iter_opts [ opt ]
2219+ ext .cfg [opt ] = value
22202220
22212221 self .log .debug ("Restored value of '%s' that was iterated over: %s" , opt , self .cfg [opt ])
22222222
@@ -4661,14 +4661,14 @@ def inject_checksums_to_json(ecs, checksum_type):
46614661
46624662 # actually inject new checksums or overwrite existing ones (if --force)
46634663 existing_checksums = app .get_checksums_from_json (always_read = True )
4664- for filename in checksums :
4664+ for filename , checksum in checksums . items () :
46654665 if filename not in existing_checksums :
4666- existing_checksums [filename ] = checksums [ filename ]
4666+ existing_checksums [filename ] = checksum
46674667 # don't do anything if the checksum already exist and is the same
4668- elif checksums [ filename ] != existing_checksums [filename ]:
4668+ elif checksum != existing_checksums [filename ]:
46694669 if build_option ('force' ):
46704670 print_warning ("Found existing checksums for %s, overwriting them (due to --force)..." % ec_fn )
4671- existing_checksums [filename ] = checksums [ filename ]
4671+ existing_checksums [filename ] = checksum
46724672 else :
46734673 raise EasyBuildError ("Found existing checksum for %s, use --force to overwrite them" % filename )
46744674
0 commit comments