From: Benjamin Peterson Date: Fri, 20 Feb 2009 03:19:25 +0000 (+0000) Subject: fix None errno #5312 X-Git-Tag: v3.1a1~134 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b068190aa4de5ade2d755ee25dbf3d21452616a;p=python fix None errno #5312 --- diff --git a/Lib/os.py b/Lib/os.py index 5a020d3227..65f88ba189 100644 --- 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. diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 5d3e040a55..20704952f4 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -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