]> granicus.if.org Git - python/commitdiff
fix None errno #5312
authorBenjamin Peterson <benjamin@python.org>
Fri, 20 Feb 2009 03:19:25 +0000 (03:19 +0000)
committerBenjamin Peterson <benjamin@python.org>
Fri, 20 Feb 2009 03:19:25 +0000 (03:19 +0000)
Lib/os.py
Lib/test/test_subprocess.py

index 5a020d322791b3c1651c7f16f4862b265cc23778..65f88ba1892b2142f920bcdefaff462b7ee52c5a 100644 (file)
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -372,8 +372,8 @@ def _execvpe(file, args, env=None):
                 saved_exc = e
                 saved_tb = tb
     if saved_exc:
-        raise error(saved_exc).with_traceback(saved_tb)
-    raise error(last_exc).with_traceback(tb)
+        raise saved_exc.with_traceback(saved_tb)
+    raise last_exc.with_traceback(tb)
 
 
 # Change environ to automatically call putenv(), unsetenv if they exist.
index 5d3e040a557e6b43a13e5cb6ab223b7f5592339f..20704952f4313ddf1142f9ef7fa7e77413d93c09 100644 (file)
@@ -535,7 +535,7 @@ class ProcessTestCase(unittest.TestCase):
             # Windows raises IOError
             except (IOError, OSError) as err:
                 if err.errno != 2:  # ignore "no such file"
-                    pass # XXX see #5312
+                    raise
 
     #
     # POSIX tests