diff options
author | jerous <jerous@gmail.com> | 2008-08-24 18:07:31 +0200 |
---|---|---|
committer | jerous <jerous@gmail.com> | 2008-08-24 18:07:31 +0200 |
commit | d509faa7eee2b2e2354711006aee89d0468ab940 (patch) | |
tree | dce8688ed38680dba2d9ce2869e9fdbe59193980 /mpd.py | |
parent | aafd9acd552099623204b2249e2c70b3cf27f95a (diff) |
update of mpd
Diffstat (limited to 'mpd.py')
-rw-r--r-- | mpd.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -291,9 +291,13 @@ class MPDClient(object): if self._sock: raise ConnectionError("Already connected") msg = "getaddrinfo returns an empty list" + try: + flags = socket.AI_ADDRCONFIG + except AttributeError: + flags = 0 for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM, socket.IPPROTO_TCP, - socket.AI_ADDRCONFIG): + flags): af, socktype, proto, canonname, sa = res try: self._sock = socket.socket(af, socktype, proto) |