diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-27 07:33:59 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-27 07:33:59 -0800 |
commit | 5516f8fa58d73bc96a7e4ab01d677cdb3eb25bd1 (patch) | |
tree | d104c5293fd3ce300adb4d1c7ecd478b2e53a2d9 /tools | |
parent | 631f2c60e19915020bafff61097c337dfd7c2ec2 (diff) | |
parent | 12707610d913c3110faa02f29f358059b897c029 (diff) |
Merge pull request #872 from juj/popen_print
Add additional error reporting to Popen failures on Windows to be able t...
Diffstat (limited to 'tools')
-rw-r--r-- | tools/shared.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/shared.py b/tools/shared.py index d9dd62e8..524145fa 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) |