commit db9ab3754a0a45fb421211ea9b815b4449999c66 Author: rl1987 rl1987@sdf.lonestar.org Date: Mon Dec 3 14:49:33 2018 +0200
Print error message we get from socket.connect_ex when it fails --- src/test/test_rebind.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/test/test_rebind.py b/src/test/test_rebind.py index 6f759b717..7d0ccaf62 100644 --- a/src/test/test_rebind.py +++ b/src/test/test_rebind.py @@ -19,9 +19,10 @@ def fail(msg):
def try_connecting_to_socksport(): socks_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - if socks_socket.connect_ex(('127.0.0.1', socks_port)): + e = socks_socket.connect_ex(('127.0.0.1', socks_port)) + if e: tor_process.terminate() - fail('Cannot connect to SOCKSPort') + fail('Cannot connect to SOCKSPort: error ' + os.strerror(e)) socks_socket.close()
def wait_for_log(s):
tor-commits@lists.torproject.org