From: Antoine Pitrou Date: Sun, 17 Aug 2008 20:15:07 +0000 (+0000) Subject: #3580: fix a failure in test_os X-Git-Tag: v2.6b3~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=954ea6475364f4ffb68ecc66ff0d228f086416b7;p=thirdparty%2FPython%2Fcpython.git #3580: fix a failure in test_os --- diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 7cfae4498eec..b644bdcdcd93 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")