Commit ee36cc0d authored by Chris Lawrence's avatar Chris Lawrence Committed by Brian May

Trap UnicodeError to handle cases where hostnames returned by DNS are invalid.

parent f0c13eaf
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment