[telepathy-gabble/telepathy-gabble-0.8] Use gethostbyname() rather than gethostbyaddr().

David Laban david.laban at collabora.co.uk
Mon Sep 28 09:27:15 PDT 2009


Seems that gethostbyaddr() tries to do reverse lookup as well,
which fails now that stun.collabora.co.uk has moved to its own
host.
---
 tests/twisted/jingle/stun-server.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/twisted/jingle/stun-server.py b/tests/twisted/jingle/stun-server.py
index fad761d..c6831ea 100644
--- a/tests/twisted/jingle/stun-server.py
+++ b/tests/twisted/jingle/stun-server.py
@@ -106,13 +106,13 @@ def test(q, bus, conn, stream,
         # address then gabble should be able to resolv it as well
         try:
             expected_stun_server = \
-                socket.gethostbyaddr("stun.collabora.co.uk")[2][0]
+                socket.gethostbyname("stun.collabora.co.uk")
             expected_stun_port = 3478
         except:
             expected_stun_server = None
 
     if expected_stun_server is None:
-        assert sh_props['STUNServers'] == stun_address, sh_props['STUNServers']
+        assert sh_props['STUNServers'] == [], sh_props['STUNServers']
     else:
         assert sh_props['STUNServers'] == \
             [(expected_stun_server, expected_stun_port)], \
-- 
1.5.6.5



More information about the telepathy-commits mailing list