Zsolt Cserna <zsolt.cse...@morganstanley.com> added the comment: The order of the IP addresses doesn't matter as urllib2 is flexible enough to handle all local IP addresses as local (that was the original bug - it handled only one IP returned by gethostbyname which returned a random IP if there were more than one).
So picking up the first IP is ok I think as the order of the IP addresses doesn't matter - urllib2 will handle all of them as local. See urllib2.FileHandler.get_names(). The problem is that gethostbyname doesn't guarantee that it returns one IP address from the set returned by gethostbyname_ex as gethostbyname looks up the name in /etc/hosts file first (or as configured in NSS). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5625> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com