From 6d94627f1ecd5d9142382daa4da612ed12daf82f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 10 Aug 2001 19:42:38 +0000 Subject: Allow AttributeError as well as TypeError for attribute-less objects. --- Lib/test/test_descr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 92f79d5..9f731cd 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -481,7 +481,7 @@ def objects(): verify(not hasattr(a, "foo")) try: a.foo = 12 - except TypeError: + except (AttributeError, TypeError): pass else: verify(0, "object() should not allow setting a foo attribute") -- cgit v0.12