diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-05-30 17:05:07 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-05-30 17:05:49 +0200 |
commit | 598656985aeb1a1ac11d246bb942c2248dfbfd8c (patch) | |
tree | 1e6234525f918baf5a628ad7feeaa8098b26f977 | |
parent | a1b44f4335f41a0c11505f1552d9173ca0b469f4 (diff) | |
download | samba-598656985aeb1a1ac11d246bb942c2248dfbfd8c.tar.gz samba-598656985aeb1a1ac11d246bb942c2248dfbfd8c.tar.bz2 samba-598656985aeb1a1ac11d246bb942c2248dfbfd8c.zip |
selftest: list.remove raises ValueError rather than KeyError.
-rw-r--r-- | selftest/subunithelper.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/selftest/subunithelper.py b/selftest/subunithelper.py index d03a1d0441..d2054a9498 100644 --- a/selftest/subunithelper.py +++ b/selftest/subunithelper.py @@ -76,7 +76,7 @@ def parse_results(msg_ops, statistics, fh): if result in ("success", "successful"): try: open_tests.remove(testname) - except KeyError: + except ValueError: statistics['TESTS_ERROR']+=1 msg_ops.end_test(testname, "error", True, "Test was never started") @@ -86,7 +86,7 @@ def parse_results(msg_ops, statistics, fh): elif result in ("xfail", "knownfail"): try: open_tests.remove(testname) - except KeyError: + except ValueError: statistics['TESTS_ERROR']+=1 msg_ops.end_test(testname, "error", True, "Test was never started") @@ -97,7 +97,7 @@ def parse_results(msg_ops, statistics, fh): elif result in ("failure", "fail"): try: open_tests.remove(testname) - except KeyError: + except ValueError: statistics['TESTS_ERROR']+=1 msg_ops.end_test(testname, "error", True, "Test was never started") @@ -115,7 +115,7 @@ def parse_results(msg_ops, statistics, fh): statistics['TESTS_ERROR']+=1 try: open_tests.remove(testname) - except KeyError: + except ValueError: pass msg_ops.end_test(testname, "error", True, reason) elif result == "skip-testsuite": |