aboutsummaryrefslogtreecommitdiff
path: root/tools/shared.py
diff options
context:
space:
mode:
authorJukka Jylänki <jujjyl@gmail.com>2013-02-25 01:04:23 +0200
committerJukka Jylänki <jujjyl@gmail.com>2013-02-25 01:04:23 +0200
commit12707610d913c3110faa02f29f358059b897c029 (patch)
tree14471dff333620cea2ff52ea3c9b7a70c20e2912 /tools/shared.py
parent019c14d581919c1c6756365acfd8c570f1a7d39c (diff)
Add additional error reporting to Popen failures on Windows to be able to pinpoint what command line causes a failure.
Diffstat (limited to 'tools/shared.py')
-rw-r--r--tools/shared.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/shared.py b/tools/shared.py
index ebf803da..d391caa2 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -28,7 +28,10 @@ class WindowsPopen:
self.stderr_ = PIPE
# Call the process with fixed streams.
- self.process = subprocess.Popen(args, bufsize, executable, self.stdin_, self.stdout_, self.stderr_, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags)
+ try:
+ self.process = subprocess.Popen(args, bufsize, executable, self.stdin_, self.stdout_, self.stderr_, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags)
+ except Exception, e:
+ print >> sys.stderr, 'subprocess.Popen(args=%s) failed! Exception %s' % (' '.join(args), str(e))
def communicate(self, input=None):
output = self.process.communicate(input)