mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Print error message we get from socket.connect_ex when it fails
This commit is contained in:
parent
25f3b82445
commit
db9ab3754a
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user