summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGrissiom <[email protected]>2014-06-07 16:46:00 +0800
committerGrissiom <[email protected]>2014-06-09 11:35:36 +0800
commitaf3dc0e63efa6ed6f7feae926065a68542090f80 (patch)
tree5a1e0524add4b25b527681e1907364eb9da36ea0 /tools
parent0c8335d5ab046ce9fe36c4e01d5d40e4ba152b49 (diff)
tools/building.py: more descriptive on error
Print the command that failed to execute and try to tell the reason to fall.
Diffstat (limited to 'tools')
-rw-r--r--tools/building.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/building.py b/tools/building.py
index 726056533f..3572daabbe 100644
--- a/tools/building.py
+++ b/tools/building.py
@@ -43,8 +43,9 @@ class Win32Spawn:
proc = subprocess.Popen(cmdline, env=_e,
startupinfo=startupinfo, shell=False)
except Exception as e:
- print 'Error in Popen: %s' % e
- return -1
+ print 'Error in calling:\n%s' % cmdline
+ print 'Exception: %s: %s' % (e, os.strerror(e.errno))
+ return e.errno
finally:
os.environ['PATH'] = old_path