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.


git-svn-id: svn://10.0.0.236/trunk@100371 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
markh%activestate.com 2001-08-05 08:29:46 +00:00
parent 3852ac7845
commit 8eff7b011d

View File

@ -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))