remove version_info based branching

This commit is contained in:
Joshua Li
2020-06-02 19:53:46 -07:00
committed by Brian May
parent ec2018d664
commit d0f0aa9f17
4 changed files with 6 additions and 24 deletions

View File

@@ -1,4 +1,3 @@
import sys
import io
import socket
from socket import AF_INET, AF_INET6
@@ -193,9 +192,5 @@ def test_family_ip_tuple():
def test_family_to_string():
assert sshuttle.helpers.family_to_string(AF_INET) == "AF_INET"
assert sshuttle.helpers.family_to_string(AF_INET6) == "AF_INET6"
if sys.version_info < (3, 0):
expected = "1"
assert sshuttle.helpers.family_to_string(socket.AF_UNIX) == "1"
else:
expected = 'AddressFamily.AF_UNIX'
expected = 'AddressFamily.AF_UNIX'
assert sshuttle.helpers.family_to_string(socket.AF_UNIX) == expected

View File

@@ -1,9 +1,6 @@
import sys
if sys.version_info >= (3, 0):
good_python = sys.version_info >= (3, 5)
else:
good_python = sys.version_info >= (2, 7)
good_python = sys.version_info >= (3, 5)
collect_ignore = []
if not good_python: