Browse Source

Don't capture all AttributeErrors in tests

There are all kinds of possible attribute errors that we would like
to report to the developer.
Nick Mathewson 5 years ago
parent
commit
87521c429b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lib/chutney/TorNet.py

+ 2 - 1
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):