From 9acafc25f053f10d026b8d89449fdb4715c5b0d7 Mon Sep 17 00:00:00 2001 From: benoitc Date: Sun, 21 Apr 2013 07:47:19 +0200 Subject: [PATCH] catch ValueError when ipv6 isn't not supported on the platform fix #479 --- gunicorn/util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gunicorn/util.py b/gunicorn/util.py index f472cf5a..4c0c0ea6 100644 --- a/gunicorn/util.py +++ b/gunicorn/util.py @@ -209,6 +209,8 @@ def is_ipv6(addr): socket.inet_pton(socket.AF_INET6, addr) except socket.error: # not a valid address return False + except ValueError: # ipv6 not supported on this platform + return False return True