summaryrefslogtreecommitdiffstats
path: root/sshuttle/ssh.py
diff options
context:
space:
mode:
Diffstat (limited to 'sshuttle/ssh.py')
-rw-r--r--sshuttle/ssh.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sshuttle/ssh.py b/sshuttle/ssh.py
index c93aa8c..9313215 100644
--- a/sshuttle/ssh.py
+++ b/sshuttle/ssh.py
@@ -65,12 +65,12 @@ def parse_hostport(rhostport):
try:
# try to parse host as an IP adress,
# if that works it is an IPv6 address
- host = ipaddress.ip_address(host)
+ host = str(ipaddress.ip_address(host))
except ValueError:
# if that fails parse as URL to get the port
parsed = urlparse('//{}'.format(host))
try:
- host = ipaddress.ip_address(parsed.hostname)
+ host = str(ipaddress.ip_address(parsed.hostname))
except ValueError:
# else if both fails, we have a hostname with port
host = parsed.hostname