瀏覽代碼

tools/building.py: more descriptive on error

Print the command that failed to execute and try to tell the reason to
fall.
Grissiom 11 年之前
父節點
當前提交
af3dc0e63e
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      tools/building.py

+ 3 - 2
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