From bef54e778d87dacc9baefeb7c71318cf1d5e233d Mon Sep 17 00:00:00 2001 From: Joshua Li Date: Tue, 2 Jun 2020 20:01:02 -0700 Subject: remove ImportError based branching --- sshuttle/ssh.py | 15 ++------------- 1 file 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(".") -- cgit v1.2.3