Issue #1066: implement PEP 3109, 2/3 of PEP 3134.
diff --git a/Lib/os.py b/Lib/os.py
index b8d7a0f..727d0cb 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -113,7 +113,7 @@
del ce
else:
- raise ImportError, 'no os specific module found'
+ raise ImportError('no os specific module found')
sys.modules['os.path'] = path
from os.path import curdir, pardir, sep, pathsep, defpath, altsep, devnull
@@ -386,8 +386,8 @@
saved_exc = e
saved_tb = tb
if saved_exc:
- raise error, saved_exc, saved_tb
- raise error, last_exc, tb
+ raise error(saved_exc).with_traceback(saved_tb)
+ raise error(last_exc).with_traceback(tb)
# Change environ to automatically call putenv(), unsetenv if they exist.
@@ -492,7 +492,7 @@
elif WIFEXITED(sts):
return WEXITSTATUS(sts)
else:
- raise error, "Not stopped, signaled or exited???"
+ raise error("Not stopped, signaled or exited???")
def spawnv(mode, file, args):
"""spawnv(mode, file, args) -> integer