mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-02-16 18:32:03 +01:00
remove ImportError based branching
This commit is contained in:
parent
9bcca27965
commit
bef54e778d
@ -6,24 +6,13 @@ import zlib
|
|||||||
import imp
|
import imp
|
||||||
import subprocess as ssubprocess
|
import subprocess as ssubprocess
|
||||||
import shlex
|
import shlex
|
||||||
|
from shlex import quote
|
||||||
import ipaddress
|
import ipaddress
|
||||||
|
from urllib.parse import urlparse
|
||||||
# ensure backwards compatiblity with python2.7
|
|
||||||
try:
|
|
||||||
from urllib.parse import urlparse
|
|
||||||
except ImportError:
|
|
||||||
from urlparse import urlparse
|
|
||||||
|
|
||||||
import sshuttle.helpers as helpers
|
import sshuttle.helpers as helpers
|
||||||
from sshuttle.helpers import debug2
|
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):
|
def readfile(name):
|
||||||
tokens = name.split(".")
|
tokens = name.split(".")
|
||||||
|
Loading…
Reference in New Issue
Block a user