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:
parent
3852ac7845
commit
8eff7b011d
@ -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))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user