an AttributeError is perfectly acceptable here
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index a60107b..de1d06e 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -211,7 +211,7 @@
         try:
             result.st_mode = 1
             self.fail("No exception thrown")
-        except TypeError:
+        except (AttributeError, TypeError):
             pass
 
         try: