aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_rebind.py
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2018-09-14 20:13:23 +0300
committerrl1987 <rl1987@sdf.lonestar.org>2018-09-21 10:57:41 +0300
commitd40b0e73c278cd54c6c4765f35b4d031a5882562 (patch)
treeb043bc3268349bf422f5fdb05cee9079b10a3a89 /src/test/test_rebind.py
parent81199eaf0e7e78144617c277798bf0c944f7b2c7 (diff)
downloadtor-d40b0e73c278cd54c6c4765f35b4d031a5882562.tar.gz
tor-d40b0e73c278cd54c6c4765f35b4d031a5882562.zip
Check Python version in test_rebind.py
Diffstat (limited to 'src/test/test_rebind.py')
-rw-r--r--src/test/test_rebind.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test_rebind.py b/src/test/test_rebind.py
index 42a4658b49..7ba3a5796d 100644
--- a/src/test/test_rebind.py
+++ b/src/test/test_rebind.py
@@ -35,6 +35,12 @@ def pick_random_port():
return port
+if sys.hexversion < 0x02070000:
+ sys.exit("ERROR: unsupported Python version (should be >= 2.7)")
+
+if sys.hexversion > 0x03000000 and sys.hexversion < 0x03010000:
+ sys.exit("ERROR: unsupported Python3 version (should be >= 3.1)")
+
control_port = pick_random_port()
socks_port = pick_random_port()