Apparently twisted fills in inet_pton on Windows and uses different exceptions.

This commit is contained in:
Lance Stout 2012-12-21 13:43:38 -08:00
parent ed48185732
commit 3519e845a3

View File

@ -202,7 +202,7 @@ def _validate_domain(domain):
socket.inet_pton(socket.AF_INET6, domain.strip('[]')) socket.inet_pton(socket.AF_INET6, domain.strip('[]'))
domain = '[%s]' % domain.strip('[]') domain = '[%s]' % domain.strip('[]')
ip_addr = True ip_addr = True
except socket.error: except (socket.error, ValueError):
pass pass
if not ip_addr: if not ip_addr: