Make readonly members defined in C throw an AttributeError on modification. This brings them into sync with Python-level attributes. Fixes bug #1687163.
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 93e530c..a7fc1da 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -143,7 +143,7 @@
         try:
             result.st_mode = 1
             self.fail("No exception thrown")
-        except TypeError:
+        except AttributeError:
             pass
 
         try:
@@ -201,7 +201,7 @@
         try:
             result.f_bfree = 1
             self.fail("No exception thrown")
-        except TypeError:
+        except AttributeError:
             pass
 
         try: