Make readonly members defined in C throw an AttributeError on modification. This brings them into sync with Python-level attributes. Fixes bug #1687163.

This commit is contained in:
Collin Winter 2007-03-28 21:44:53 +00:00
parent d84da1b67a
commit 42dae6a89b
5 changed files with 9 additions and 9 deletions

View file

@ -143,7 +143,7 @@ class StatAttributeTests(unittest.TestCase):
try:
result.st_mode = 1
self.fail("No exception thrown")
except TypeError:
except AttributeError:
pass
try:
@ -201,7 +201,7 @@ class StatAttributeTests(unittest.TestCase):
try:
result.f_bfree = 1
self.fail("No exception thrown")
except TypeError:
except AttributeError:
pass
try: