diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 7cfae4498ee..b644bdcdcd9 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -313,7 +313,7 @@ def test_1686475(self): try: os.stat(r"c:\pagefile.sys") except WindowsError, e: - if e == 2: # file does not exist; cannot run test + if e.errno == 2: # file does not exist; cannot run test return self.fail("Could not stat pagefile.sys")