]> granicus.if.org Git - python/commitdiff
The assignment to result.st_rdev can raise AttributeError as well as
authorGuido van Rossum <guido@python.org>
Thu, 18 Oct 2001 21:19:31 +0000 (21:19 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 18 Oct 2001 21:19:31 +0000 (21:19 +0000)
TypeError (on systems where it's not defined at all, it raises
AttributeError; when it's defined, assignment to it raises TypeError).

Lib/test/test_os.py

index bec3b907e7531c8cdd57261fa4d8a0f842715c64..6adf109f86d0bce43036c40453ec7b4daac6f120 100644 (file)
@@ -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: