mirror of
https://github.com/sshuttle/sshuttle.git
synced 2024-11-21 23:43:18 +01:00
Trap UnicodeError to handle cases where hostnames returned by DNS are invalid.
This commit is contained in:
parent
f0c13eafe9
commit
ee36cc0d00
@ -108,7 +108,7 @@ def _check_revdns(ip):
|
||||
debug3('< %s\n' % r[0])
|
||||
check_host(r[0])
|
||||
found_host(r[0], ip)
|
||||
except socket.herror:
|
||||
except (socket.herror, UnicodeError):
|
||||
pass
|
||||
|
||||
|
||||
@ -119,7 +119,7 @@ def _check_dns(hostname):
|
||||
debug3('< %s\n' % ip)
|
||||
check_host(ip)
|
||||
found_host(hostname, ip)
|
||||
except socket.gaierror:
|
||||
except (socket.gaierror, UnicodeError):
|
||||
pass
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user