[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [chutney/master] Stop assuming that test module attribute errors are about run_test



commit f1835b17ec878e1c4cdd87a015218f3fbf024ab0
Author: teor <teor2345@xxxxxxxxx>
Date:   Wed Sep 13 14:21:58 2017 +1000

    Stop assuming that test module attribute errors are about run_test
    
    Fixes 23497, introduced when the verify test was refactored into
    a test script.
---
 lib/chutney/TorNet.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py
index 5d44128..aeab347 100644
--- a/lib/chutney/TorNet.py
+++ b/lib/chutney/TorNet.py
@@ -1118,8 +1118,8 @@ def runConfigFile(verb, data):
         test_module = importlib.import_module("chutney_tests.{}".format(verb))
         try:
             return test_module.run_test(network)
-        except AttributeError:
-            print("Test {!r} has no 'run_test(network)' function".format(verb))
+        except AttributeError as e:
+            print("Error running test {!r}: {}".format(verb, e))
             return False
 
     # tell the user we don't know what their verb meant



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits