Merge pull request #285 from grissiom/better-tools

tools/building.py: more descriptive on error
This commit is contained in:
Bernard Xiong 2014-06-09 12:13:04 +08:00
commit fbe4d59db2
1 changed files with 3 additions and 2 deletions

View File

@ -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