commit 87521c429be8b7ca2a472cbea73f1200a6bad3e1 Author: Nick Mathewson nickm@torproject.org Date: Thu May 9 19:48:25 2019 -0400
Don't capture all AttributeErrors in tests
There are all kinds of possible attribute errors that we would like to report to the developer. --- lib/chutney/TorNet.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py index 16f4345..b015efb 100644 --- a/lib/chutney/TorNet.py +++ b/lib/chutney/TorNet.py @@ -1295,10 +1295,11 @@ def runConfigFile(verb, data): if verb in getTests(): test_module = importlib.import_module("chutney_tests.{}".format(verb)) try: - return test_module.run_test(network) + run_test = test_module.run_test except AttributeError as e: print("Error running test {!r}: {}".format(verb, e)) return False + return run_test(network)
# tell the user we don't know what their verb meant if not hasattr(network, verb):
tor-commits@lists.torproject.org