From af3dc0e63efa6ed6f7feae926065a68542090f80 Mon Sep 17 00:00:00 2001 From: Grissiom Date: Sat, 7 Jun 2014 16:46:00 +0800 Subject: [PATCH] tools/building.py: more descriptive on error Print the command that failed to execute and try to tell the reason to fall. --- tools/building.py | 5 +++-- 1 file 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