diff options
author | Guido van Rossum <guido@python.org> | 2001-08-10 19:42:38 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-08-10 19:42:38 (GMT) |
commit | 6d94627f1ecd5d9142382daa4da612ed12daf82f (patch) | |
tree | 5ee3962ea6c5e0edb8bc03e9ae4a8bbcf600c545 /Lib | |
parent | c4416d5a2ca4aa4eb2eac90b207118cb267d0fe1 (diff) | |
download | cpython-6d94627f1ecd5d9142382daa4da612ed12daf82f.zip cpython-6d94627f1ecd5d9142382daa4da612ed12daf82f.tar.gz cpython-6d94627f1ecd5d9142382daa4da612ed12daf82f.tar.bz2 |
Allow AttributeError as well as TypeError for attribute-less objects.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_descr.py | 2 |
1 files changed, 1 insertions, 1 deletions
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") |