diff options
author | Joshua Li <josh@jrl.ninja> | 2020-06-02 20:01:02 -0700 |
---|---|---|
committer | Brian May <brian@linuxpenguins.xyz> | 2020-06-03 14:30:37 +1000 |
commit | bef54e778d87dacc9baefeb7c71318cf1d5e233d (patch) | |
tree | 9be22bfa2344eb0065ae76efdb466db57678202d | |
parent | 9bcca27965a20e45c6f9b806fa982a8e363f44df (diff) |
remove ImportError based branching
-rw-r--r-- | sshuttle/ssh.py | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/sshuttle/ssh.py b/sshuttle/ssh.py index 464e92c..5c968f0 100644 --- a/sshuttle/ssh.py +++ b/sshuttle/ssh.py @@ -6,24 +6,13 @@ import zlib import imp import subprocess as ssubprocess import shlex +from shlex import quote import ipaddress - -# ensure backwards compatiblity with python2.7 -try: - from urllib.parse import urlparse -except ImportError: - from urlparse import urlparse +from urllib.parse import urlparse import sshuttle.helpers as helpers from sshuttle.helpers import debug2 -try: - # Python >= 3.5 - from shlex import quote -except ImportError: - # Python 2.x - from pipes import quote - def readfile(name): tokens = name.split(".") |