diff --git a/Lib/test/test_mailbox.py b/Lib/test/test_mailbox.py index e28d721f0aa..382a42e774f 100644 --- a/Lib/test/test_mailbox.py +++ b/Lib/test/test_mailbox.py @@ -21,8 +21,8 @@ finally: try: os.rmdir(newdir) - except IOError: pass + except os.error: pass try: os.rmdir(curdir) - except IOError: pass + except os.error: pass try: os.rmdir(test_support.TESTFN) - except IOError: pass + except os.error: pass