summaryrefslogtreecommitdiffstats
path: root/sshuttle
diff options
context:
space:
mode:
authorJoshua Li <josh@jrl.ninja>2020-06-02 19:53:46 -0700
committerBrian May <brian@linuxpenguins.xyz>2020-06-03 14:30:37 +1000
commitd0f0aa9f17ad1786ac88457ca5b56222849ebe1a (patch)
tree2a2ab02b9fdfa90a766f44679d83f7e09060c385 /sshuttle
parentec2018d66492e7eff5da7d02c801f19b2a60814b (diff)
remove version_info based branching
Diffstat (limited to 'sshuttle')
-rw-r--r--sshuttle/client.py7
-rw-r--r--sshuttle/helpers.py11
2 files changed, 4 insertions, 14 deletions
diff --git a/sshuttle/client.py b/sshuttle/client.py
index efdaae1..9a0f15b 100644
--- a/sshuttle/client.py
+++ b/sshuttle/client.py
@@ -228,12 +228,7 @@ class FirewallClient:
pass
self.argv = argv
s1.close()
- if sys.version_info < (3, 0):
- # python 2.7
- self.pfile = s2.makefile('wb+')
- else:
- # python 3.5
- self.pfile = s2.makefile('rwb')
+ self.pfile = s2.makefile('rwb')
if e:
log('Spawning firewall manager: %r\n' % self.argv)
raise Fatal(e)
diff --git a/sshuttle/helpers.py b/sshuttle/helpers.py
index 4a41e4e..6c8ab82 100644
--- a/sshuttle/helpers.py
+++ b/sshuttle/helpers.py
@@ -5,16 +5,11 @@ import errno
logprefix = ''
verbose = 0
-if sys.version_info[0] == 3:
- binary_type = bytes
+binary_type = bytes
- def b(s):
- return s.encode("ASCII")
-else:
- binary_type = str
- def b(s):
- return s
+def b(s):
+ return s.encode("ASCII")
def log(s):