mozilla/socorro — pull request #559 by rhelmer (2012-05-03 21:58:19+00:00)
Title: work around ipv6 getaddr bug in statsd client

StatsClient constructor does this:

# Use getaddrinfo to support IPv4/6.
self._addr = socket.getaddrinfo(host, port)[0][4]

This works for both IPv4/6, but the problem is that IPv4 addresses return a two-tuple while IPv6 returns a four-tuple.

See:
http://docs.python.org/library/socket.html#socket.getaddrinfo

Specifically:
"""whose format depends on the returned family (a (address, port) 2-tuple for AF_INET, a (address, port, flow info, scope id) 4-tuple for AF_INET6"""

I'll see if I can get a patch upstream too.