Skip to content

Commit ace2abf

Browse files
committed
added 'colored' graph to graph2use
1 parent 7c7facd commit ace2abf

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

nipype/pipeline/engine.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -443,17 +443,11 @@ def write_graph(self, dotfilename='graph.dot', graph2use='hierarchical',
443443
else:
444444
base_dir = os.getcwd()
445445
base_dir = make_output_dir(base_dir)
446-
if graph2use == 'hierarchical' or graph2use == 'colored':
446+
if graph2use in ['hierarchical', 'colored']:
447447
dotfilename = os.path.join(base_dir, dotfilename)
448-
if graph2use == 'colored':
449-
self.write_hierarchical_dotfile(dotfilename=dotfilename,
450-
colored=True,
451-
simple_form=simple_form)
452-
453-
else:
454-
self.write_hierarchical_dotfile(dotfilename=dotfilename,
455-
colored=False,
456-
simple_form=simple_form)
448+
self.write_hierarchical_dotfile(dotfilename=dotfilename,
449+
colored=graph2use == "colored",
450+
simple_form=simple_form)
457451
format_dot(dotfilename, format=format)
458452
else:
459453
graph = self._graph

0 commit comments

Comments
 (0)