Fix error in exception, which should never be hit (but _is_ hit for

Python 2.2 - need to sort that one out later!)

Not part of the build.
This commit is contained in:
markh%activestate.com 2001-08-05 08:29:46 +00:00
Родитель b68e130ebb
Коммит 5af85a1e5f
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -61,6 +61,7 @@ def test_attribute_failure(ob, attr_name, new_value, expected_exception):
print_error("*** Setting attribute '%s' to '%r' didnt yield an exception!" % (attr_name, new_value) )
except:
exc_typ = sys.exc_info()[0]
exc_val = sys.exc_info()[1]
ok = issubclass(exc_typ, expected_exception)
if not ok:
print_error("*** Wrong exception setting '%s' to '%r'- got '%s: %s', expected '%s'" % (attr_name, new_value, exc_typ, exc_val, expected_exception))