James Crowther added the comment: Hi Ned, Thats ok, thanks! I’m going to try it on another machine, its really strange, I’m wondering what I might have done on my mac to cause it to flake out like this. Will do some more testing with other macs running 10.12 and see if they have the same behaviour, by the way, thanks for running that last test as it shows that this call is actually working on some systems. I really need to know the reason why its not working on mine, I have about 120 users and need to be sure that they’re not going to have our next build break if we rely on this call.
Thanks :D James > On 3 Mar 2017, at 1:45 pm, Ned Deily <rep...@bugs.python.org> wrote: > > > Ned Deily added the comment: > > James, I'm sorry I didn't show it but using socket.gethostname() as the > source of hostname works just fine, too. > > import socket >>>> hostname = socket.gethostname() >>>> hostname > 'harj.local' >>>> socket.getaddrinfo(hostname, None) > [(<AddressFamily.AF_INET6: 30>, <SocketKind.SOCK_DGRAM: 2>, 17, '', > ('fe80::8d8:1de3:dfa:e34c%en1', 0, 0, 5)), (<AddressFamily.AF_INET6: 30>, > <SocketKind.SOCK_STREAM: 1>, 6, '', ('fe80::8d8:1de3:dfa:e34c%en1', 0, 0, > 5)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, '', > ('10.0.1.7', 0)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, > 6, '', ('10.0.1.7', 0))] > > I don't know what to tell you other than the behavior you are seeing is > almost certainly not a Python issue. There are many other ways to explore > host names, like using the "host" command line utility or "netstat". But > that is all beyond the scope of this bug tracker. If you need more > assistance, perhaps ask on one of the StackExchange forums or Apple lists. > I'm going to close this issue; if you are able to isolate what appears to be > a Python issue here, please feel free to re-open this. Good luck! > > ---------- > resolution: -> works for me > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <http://bugs.python.org/issue29705> > _______________________________________ ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29705> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com