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).
This commit is contained in:
Guido van Rossum 2001-10-18 21:19:31 +00:00
parent a5e616510e
commit 1fff878c45

View 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: