From 597eb1779c497ad850fe3c03fd480fea5c9ef7ea Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sat, 29 Dec 2012 15:17:15 -0800 Subject: Fix other instance of inet_pton usage. --- sleekxmpp/xmlstream/resolver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sleekxmpp/xmlstream') diff --git a/sleekxmpp/xmlstream/resolver.py b/sleekxmpp/xmlstream/resolver.py index 394daa64..16f8a7ad 100644 --- a/sleekxmpp/xmlstream/resolver.py +++ b/sleekxmpp/xmlstream/resolver.py @@ -113,7 +113,7 @@ def resolve(host, port=None, service=None, proto='tcp', if hasattr(socket, 'inet_pton'): ipv6 = socket.inet_pton(socket.AF_INET6, host) yield (host, host, port) - except socket.error: + except (socket.error, ValueError): pass # If no service was provided, then we can just do A/AAAA lookups on the -- cgit v1.2.3