针对ns3所用bake的更新

来源:互联网 发布:深入理解nginx 百度云 编辑:程序博客网 时间:2024/06/05 18:42

增加了一些调试信息

diff -r 4324b07d0a74 bake/ModuleEnvironment.py

--- a/bake/ModuleEnvironment.py    Thu May 07 12:57:25 2015 -0700
+++ b/bake/ModuleEnvironment.py    Fri Jun 05 11:14:23 2015 +0800
@@ -514,9 +514,12 @@
         
         # sets the library and binary paths
         tmp = self.append_to_path(tmp)
-        
         # Calls the third party executable with the whole context
+
         try:
+        print(' execute: %s %s. \n'
+                                % (str(directory), str(args)))
+
             popen = subprocess.Popen(args,
                                      stdin = stdin,
                                      stdout = stdout,
@@ -530,6 +533,8 @@
         # Waits for the full execution of the third party software
         retcode = popen.wait()
         if retcode != 0:
-            raise TaskError('Subprocess failed with error %d: %s' % (retcode, str(args)))
+            print('Subprocess failed with error %d: %s, %s' % (retcode, os.strerror(retcode), str(args)))
+          raise TaskError('Subprocess failed with error %d: %s' % (retcode, str(args)))
+
 
         
[root@gdc1000 bake]#

0 0
原创粉丝点击