[Python-Dev] Mac OSX issues
Guido van Rossum
guido@python.org
Tue, 03 Dec 2002 03:44:14 -0500
> Guido> I'm still seeing errors in test_socket; today (on a different
> Guido> network) I got this:
>
> Guido> test test_socket failed -- Traceback (most recent call last):
> Guido> File "/Users/guido/python/src/Lib/test/test_socket.py", line 223, in testHostnameRes
> Guido> ip = socket.gethostbyname(hostname)
> Guido> gaierror: (7, 'No address associated with nodename')
>
> What does the hostname(1) command return? By default I think it generates
> some oddball thing like "Montanaro.local.". Apple calls it a Rendevous
> name. (I've no idea what that is.) The fix for me was recommended by
> another group: get a dyndns.org account and change the HOSTNAME line in
> /etc/hostconfig from
>
> HOSTNAME=-AUTOMATIC-
>
> to
>
> HOSTNAME=montanaro.dyndns.org
Thanks, Skip, but I'm more interested in fixing test_socket so it
doesn 't rely on this. Maybe testHostnameRes() should be disabled
when gethostbyaddr() gives an error? It makes unwarranted assumptions
IMO about how DNS is set up.
--Guido van Rossum (home page: http://www.python.org/~guido/)