Skip to content

Commit 1fac0b7

Browse files
committed
Let nipype work with python 2.6 again
This file runs even when importing nipype.interfaces.io, hence make nipype unsuable without python 2.7
1 parent 8fae568 commit 1fac0b7

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)