From 3519e845a35d6ac1fdd07091b99f02a8a391147a Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Fri, 21 Dec 2012 13:43:38 -0800 Subject: [PATCH] Apparently twisted fills in inet_pton on Windows and uses different exceptions. --- sleekxmpp/jid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sleekxmpp/jid.py b/sleekxmpp/jid.py index bf0c1970..752c3210 100644 --- a/sleekxmpp/jid.py +++ b/sleekxmpp/jid.py @@ -202,7 +202,7 @@ def _validate_domain(domain): socket.inet_pton(socket.AF_INET6, domain.strip('[]')) domain = '[%s]' % domain.strip('[]') ip_addr = True - except socket.error: + except (socket.error, ValueError): pass if not ip_addr: