From 56f8ebefa837c35bcfa6b1554057105baa9eb7f7 Mon Sep 17 00:00:00 2001 From: Marcel Falkiewicz Date: Sun, 7 Jan 2018 11:16:04 +0100 Subject: [PATCH] Convert generators to lists --- nipype/pipeline/plugins/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index bab2812903..1948b79244 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -519,14 +519,14 @@ def run(self, graph, config, updatehash=False): pyfiles = [] dependencies = {} self._config = config - nodes = nx.topological_sort(graph) + nodes = list(nx.topological_sort(graph)) logger.debug('Creating executable python files for each node') for idx, node in enumerate(nodes): pyfiles.append(create_pyscript(node, updatehash=updatehash, store_exception=False)) dependencies[idx] = [nodes.index(prevnode) for prevnode in - graph.predecessors(node)] + list(graph.predecessors(node))] self._submit_graph(pyfiles, dependencies, nodes) def _get_args(self, node, keywords):