Skip to content

Commit c75e355

Browse files
committed
Merge pull request #625 from hanke/no_dict_comprh_in_2.6
Let nipype work with python 2.6 again
2 parents 8fae568 + 1fac0b7 commit c75e355

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nipype/interfaces/ants/registration.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,9 @@ def _formatMetric(self, index):
437437
if isinstance(name_input, list):
438438
items = stage_inputs.items()
439439
indexes = range(0, len(name_input))
440-
specs = [{k: v[i] for k, v in items} for i in indexes]
440+
# dict-comprehension only works with python 2.7 and up
441+
#specs = [{k: v[i] for k, v in items} for i in indexes]
442+
specs = [dict([(k, v[i]) for k,v in items]) for i in indexes]
441443
else:
442444
specs = [stage_inputs]
443445

0 commit comments

Comments
 (0)