wutils.py
changeset 4583 384117906219
parent 4388 fd90dd412e67
child 4584 7f4ee7f84b19
--- a/wutils.py	Wed Jun 24 09:45:31 2009 +0200
+++ b/wutils.py	Wed Jun 24 16:12:09 2009 +0100
@@ -136,7 +136,15 @@
         if retval == 0 and error:
             retval = 1
     else:
-        retval = subprocess.Popen(argv, env=proc_env, cwd=cwd).wait()
+        try:
+            WindowsError
+        except NameError:
+            retval = subprocess.Popen(argv, env=proc_env, cwd=cwd).wait()
+        else:
+            try:
+                retval = subprocess.Popen(argv, env=proc_env, cwd=cwd).wait()
+            except WindowsError, ex:
+                raise Utils.WafError("Command %s raised exception %s" % (argv, ex))
     if retval:
         raise Utils.WafError("Command %s exited with code %i" % (argv, retval))
     return retval