From 974b89322933b4cd0ca05ac2063fbae21323314c Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Mon, 7 Nov 2005 13:11:26 +0000 Subject: [PATCH] fix logic --- src/common/connection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/connection.py b/src/common/connection.py index 66f9bf59d..868c539c1 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -1510,7 +1510,8 @@ class Connection: hosts = [] # SRV resolver if use_srv and (HAS_DNSPYTHON or HAS_PYDNS): - query = '_xmpp-client._tcp.' + h.decode('utf-8') + # query should not be Unicode instance or dnspython TBs! + query = '_xmpp-client._tcp.' + h.encode('utf-8') try: if HAS_DNSPYTHON: answers = [x for x in dns.resolver.query(query, 'SRV')]