This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author csernazs
Recipients csernazs, dmorr, ned.deily, orsenthil
Date 2010-12-15.13:34:26
SpamBayes Score 1.7940242e-07
Marked as misclassified No
Message-id <1292420068.68.0.346834467459.issue5625@psf.upfronthosting.co.za>
In-reply-to
Content
The test which failed was HandlerTests.test_file, and I'm using python 2.7.1.

socket.gethostbyname('localhost') returns "127.0.0.1" which is ok, but in the unittest it's already tested (line 671).

The problem is that my /etc/hosts file contains a different IP than the DNS (I cannot change this behaviour as I'm not the administrator of the host) and that's the difference between gethostbyname and gethostbyname_ex.

The unittest creates an url which is not local (from urllib2 point of view). I'm attaching a patch which has fixed my problem.
History
Date User Action Args
2010-12-15 13:34:28csernazssetrecipients: + csernazs, orsenthil, dmorr, ned.deily
2010-12-15 13:34:28csernazssetmessageid: <1292420068.68.0.346834467459.issue5625@psf.upfronthosting.co.za>
2010-12-15 13:34:27csernazslinkissue5625 messages
2010-12-15 13:34:27csernazscreate