Skip to content
Snippets Groups Projects
Commit 41b7de1d authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

small update in process_exec.py

parent 8e1f2d01
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ def pexec(args, cwd=None):
args[i] = str(args[i]).replace('/', os.path.sep).replace('\\', os.path.sep).replace('"', '')
cmd = "%s" % '{} /c "{}"'.format (os.environ.get("COMSPEC", "cmd.exe"), subprocess.list2cmdline(args))
if os.path.isfile(cwd):
if cwd and os.path.isfile(cwd):
cwd = os.path.dirname(cwd)
proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, cwd=cwd)
stdout, stderr = proc.communicate()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment