зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
b68e130ebb
Коммит
5af85a1e5f
|
@ -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) )
|
print_error("*** Setting attribute '%s' to '%r' didnt yield an exception!" % (attr_name, new_value) )
|
||||||
except:
|
except:
|
||||||
exc_typ = sys.exc_info()[0]
|
exc_typ = sys.exc_info()[0]
|
||||||
|
exc_val = sys.exc_info()[1]
|
||||||
ok = issubclass(exc_typ, expected_exception)
|
ok = issubclass(exc_typ, expected_exception)
|
||||||
if not ok:
|
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))
|
print_error("*** Wrong exception setting '%s' to '%r'- got '%s: %s', expected '%s'" % (attr_name, new_value, exc_typ, exc_val, expected_exception))
|
||||||
|
|
Загрузка…
Ссылка в новой задаче