From: Guido van Rossum Date: Thu, 18 Oct 2001 21:19:31 +0000 (+0000) Subject: The assignment to result.st_rdev can raise AttributeError as well as X-Git-Tag: v2.2.1c1~1169 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1fff878c4587069e5c2976e157f4981599b50376;p=thirdparty%2FPython%2Fcpython.git The assignment to result.st_rdev can raise AttributeError as well as TypeError (on systems where it's not defined at all, it raises AttributeError; when it's defined, assignment to it raises TypeError). --- diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index bec3b907e753..6adf109f86d0 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -111,7 +111,7 @@ class StatAttributeTests(unittest.TestCase): try: result.st_rdev = 1 self.fail("No exception thrown") - except TypeError: + except (AttributeError, TypeError): pass try: