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

[tor-commits] [tor/master] Tweak test_rebind.py for future-proofness



commit 3f34fc921c456a7f6bd7fc7401240aa4ae60d045
Author: rl1987 <rl1987@xxxxxxxxxxxxxxxx>
Date:   Tue May 22 17:36:06 2018 +0200

    Tweak test_rebind.py for future-proofness
---
 src/test/test_rebind.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/test/test_rebind.py b/src/test/test_rebind.py
index 582e49601..4a132411b 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()



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