summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Li <josh@jrl.ninja>2020-06-02 19:56:34 -0700
committerBrian May <brian@linuxpenguins.xyz>2020-06-03 14:30:37 +1000
commit9bcca27965a20e45c6f9b806fa982a8e363f44df (patch)
tree3398edb85451448eebf663590704a32926339af9
parentd0f0aa9f17ad1786ac88457ca5b56222849ebe1a (diff)
reduce
-rw-r--r--sshuttle/helpers.py2
-rw-r--r--sshuttle/ssnet.py4
-rw-r--r--tests/conftest.py7
3 files changed, 2 insertions, 11 deletions
diff --git a/sshuttle/helpers.py b/sshuttle/helpers.py
index 6c8ab82..a62bea9 100644
--- a/sshuttle/helpers.py
+++ b/sshuttle/helpers.py
@@ -5,8 +5,6 @@ import errno
logprefix = ''
verbose = 0
-binary_type = bytes
-
def b(s):
return s.encode("ASCII")
diff --git a/sshuttle/ssnet.py b/sshuttle/ssnet.py
index e7f668b..7604093 100644
--- a/sshuttle/ssnet.py
+++ b/sshuttle/ssnet.py
@@ -5,7 +5,7 @@ import errno
import select
import os
-from sshuttle.helpers import b, binary_type, log, debug1, debug2, debug3, Fatal
+from sshuttle.helpers import b, log, debug1, debug2, debug3, Fatal
MAX_CHANNEL = 65535
LATENCY_BUFFER_SIZE = 32768
@@ -382,7 +382,7 @@ class Mux(Handler):
# log('outbuf: %d %r\n' % (self.amount_queued(), ob))
def send(self, channel, cmd, data):
- assert isinstance(data, binary_type)
+ assert isinstance(data, bytes)
assert len(data) <= 65535
p = struct.pack('!ccHHH', b('S'), b('S'), channel, cmd, len(data)) \
+ data
diff --git a/tests/conftest.py b/tests/conftest.py
deleted file mode 100644
index 95052f1..0000000
--- a/tests/conftest.py
+++ /dev/null
@@ -1,7 +0,0 @@
-import sys
-
-good_python = sys.version_info >= (3, 5)
-
-collect_ignore = []
-if not good_python:
- collect_ignore.append("client")