Skip to content

Commit

Permalink
py 2.4 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kormoc committed Jan 29, 2014
1 parent 88340ce commit 0803ead
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/collectors/jcollectd/collectd_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,13 @@ def __init__(self, host=None, port=DEFAULT_PORT, multicast=False):
self.host, self.port = host, port
self.ipv6 = ":" in self.host

if multicast:
hostname = None
else:
hostname = self.host

family, socktype, proto, canonname, sockaddr = socket.getaddrinfo(
None if multicast else self.host,
hostname,
self.port,
socket.AF_INET6 if self.ipv6 else socket.AF_UNSPEC,
socket.SOCK_DGRAM, 0, socket.AI_PASSIVE)[0]
Expand Down

0 comments on commit 0803ead

Please sign in to comment.