[Python-checkins] r43598 - python/branches/release24-maint/Lib/test/test_socket.py

anthony.baxter python-checkins at python.org
Mon Apr 3 18:42:41 CEST 2006


Author: anthony.baxter
Date: Mon Apr  3 18:42:41 2006
New Revision: 43598

Modified:
   python/branches/release24-maint/Lib/test/test_socket.py
Log:
backport r43579 
Deal with openbsd's different style of default /etc/hosts by forcing the fqdn
lookup to use the IP address returned by gethosbyname.



Modified: python/branches/release24-maint/Lib/test/test_socket.py
==============================================================================
--- python/branches/release24-maint/Lib/test/test_socket.py	(original)
+++ python/branches/release24-maint/Lib/test/test_socket.py	Mon Apr  3 18:42:41 2006
@@ -268,7 +268,7 @@
             # Probably a similar problem as above; skip this test
             return
         all_host_names = [hostname, hname] + aliases
-        fqhn = socket.getfqdn()
+        fqhn = socket.getfqdn(ip)
         if not fqhn in all_host_names:
             self.fail("Error testing host resolution mechanisms.")
 


More information about the Python-checkins mailing list