From 954ea6475364f4ffb68ecc66ff0d228f086416b7 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 17 Aug 2008 20:15:07 +0000 Subject: [PATCH] #3580: fix a failure in test_os --- Lib/test/test_os.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ class StatAttributeTests(unittest.TestCase): 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")