We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9bee32 commit 7774e3fCopy full SHA for 7774e3f
nipype/pipeline/engine/workflows.py
@@ -486,9 +486,8 @@ def write_hierarchical_dotfile(
486
dotlist = self._get_dot(prefix=" ", colored=colored, simple_form=simple_form)
487
dotstr = f"digraph {self.name}{{\n{dotlist}\n}}"
488
if dotfilename:
489
- fp = open(dotfilename, "w")
490
- fp.writelines(dotstr)
491
- fp.close()
+ with open(dotfilename, "w") as fp:
+ fp.writelines(dotstr)
492
else:
493
logger.info(dotstr)
494
0 commit comments