diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2018-05-22 17:36:06 +0200 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-12 09:06:16 -0400 |
commit | 3f34fc921c456a7f6bd7fc7401240aa4ae60d045 (patch) | |
tree | 96e0d9f39451f2a1f11ce2c0635d5aeefd116293 /src/test/test_rebind.py | |
parent | 762c27b907192d79fbef77caee8a8b457dc7ca4a (diff) | |
download | tor-3f34fc921c456a7f6bd7fc7401240aa4ae60d045.tar.gz tor-3f34fc921c456a7f6bd7fc7401240aa4ae60d045.zip |
Tweak test_rebind.py for future-proofness
Diffstat (limited to 'src/test/test_rebind.py')
-rw-r--r-- | src/test/test_rebind.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/test_rebind.py b/src/test/test_rebind.py index 582e496012..4a132411b9 100644 --- a/src/test/test_rebind.py +++ b/src/test/test_rebind.py @@ -1,3 +1,5 @@ +from __future__ import print_function + import sys import subprocess import socket @@ -8,7 +10,7 @@ def try_connecting_to_socksport(): socks_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) if socks_socket.connect_ex(('127.0.0.1', 9052)): tor_process.terminate() - print 'FAIL' + print('FAIL') sys.exit('Cannot connect to SOCKSPort') socks_socket.close() @@ -43,7 +45,7 @@ try_connecting_to_socksport() control_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) if control_socket.connect_ex(('127.0.0.1', 9053)): tor_process.terminate() - print 'FAIL' + print('FAIL') sys.exit('Cannot connect to ControlPort') control_socket.sendall('AUTHENTICATE \r\n') @@ -60,5 +62,5 @@ try_connecting_to_socksport() control_socket.sendall('SIGNAL HALT\r\n') time.sleep(0.1) -print 'OK' +print('OK') tor_process.terminate() |