Added shell=True to Popen() on win32

This allows 'dot.exe' to be found when called with 'dot', as long as
'dot.exe' is in the PATH.
This commit is contained in:
Thibault Genessay
2016-03-01 13:01:36 +01:00
parent 01ef209420
commit fa690a7e5f

View File

@@ -269,9 +269,18 @@ class InheritanceDiagram(object):
dot_args.extend(['-Tpng', '-o' + outfn])
dot_args.extend(['-Tcmapx', '-o' + mapfile])
popen_args = {
'stdout': PIPE,
'stdin': PIPE,
'stderr': PIPE
}
if sys.platform == 'win32':
popen_args['shell'] = True
try:
p = Popen(dot_args, stdout=PIPE, stdin=PIPE, stderr=PIPE)
p = Popen(dot_args, **popen_args)
except OSError as err: