Skip to content

Commit 58a3009

Browse files
committed
No longer concatenating extensions
1 parent 557aad3 commit 58a3009

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

nipype/pipeline/engine/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,8 @@ def export_graph(graph_in, base_dir=None, show=False, use_execgraph=False,
10551055
def format_dot(dotfilename, format='png'):
10561056
"""Dump a directed graph (Linux only; install via `brew` on OSX)"""
10571057
if format != 'dot':
1058-
cmd = 'dot -T%s -O \'%s\'' % (format, dotfilename)
1058+
formatted_dotfilename = +'.'+format
1059+
cmd = 'dot -T{0} -o"{1}.{0}" "{2}"'.format(format, os.path.splitext(dotfilename)[0], dotfilename)
10591060
try:
10601061
CommandLine(cmd, resource_monitor=False).run()
10611062
except IOError as ioe:

tools/interfacedocgen.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ def _write_graph_section(self, fname, title):
228228

229229
fhandle.close()
230230
os.remove(fname)
231-
os.remove(fname + ".png")
231+
bitmap_fname = '{}.png'.format(os.path.splitext(dotfilename)[0])
232+
os.remove(bitmap_fname)
232233
return ad
233234

234235
def generate_api_doc(self, uri):

0 commit comments

Comments
 (0)