From: Guido van Rossum Date: Fri, 10 Aug 2001 19:42:38 +0000 (+0000) Subject: Allow AttributeError as well as TypeError for attribute-less objects. X-Git-Tag: v2.2a3~667 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6d94627f1ecd5d9142382daa4da612ed12daf82f;p=thirdparty%2FPython%2Fcpython.git Allow AttributeError as well as TypeError for attribute-less objects. --- diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 92f79d559858..9f731cdcc8c2 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")