Skip to content

Commit ac8fc74

Browse files
authored
FIX: Copy node list before generating a flat graph
Fixes #2820.
1 parent 32d3dfa commit ac8fc74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nipype/pipeline/engine/workflows.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ def _generate_flatgraph(self):
878878
if not nx.is_directed_acyclic_graph(self._graph):
879879
raise Exception(('Workflow: %s is not a directed acyclic graph '
880880
'(DAG)') % self.name)
881-
nodes = nx.topological_sort(self._graph)
881+
nodes = list(nx.topological_sort(self._graph))
882882
for node in nodes:
883883
logger.debug('processing node: %s', node)
884884
if isinstance(node, Workflow):

0 commit comments

Comments
 (0)