]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport r43579
authorAnthony Baxter <anthonybaxter@gmail.com>
Mon, 3 Apr 2006 16:42:41 +0000 (16:42 +0000)
committerAnthony Baxter <anthonybaxter@gmail.com>
Mon, 3 Apr 2006 16:42:41 +0000 (16:42 +0000)
Deal with openbsd's different style of default /etc/hosts by forcing the fqdn
lookup to use the IP address returned by gethosbyname.

Lib/test/test_socket.py

index b138a2dfdfb41828925542d5fed474ba16856573..14e80f1a4087e74d628d0a132be2dcd715a9defb 100644 (file)
@@ -268,7 +268,7 @@ class GeneralModuleTests(unittest.TestCase):
             # 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.")