dnspython target returns with dot in the end. catch and fix that; thanks della for helping me and reporting this
This commit is contained in:
parent
9f2a002351
commit
5868901824
|
@ -159,6 +159,7 @@ class Connection:
|
|||
self.vcard_shas = {} # sha of contacts
|
||||
self.status = ''
|
||||
self.old_show = ''
|
||||
# holds the actual hostname to which we are connected
|
||||
self.connected_hostname = None
|
||||
self.time_to_reconnect = None
|
||||
self.new_account_info = None
|
||||
|
@ -1583,7 +1584,11 @@ class Connection:
|
|||
answers = [x for x in dns.resolver.query(query, 'SRV')]
|
||||
if answers:
|
||||
for a in answers:
|
||||
hosts.append({'host': str(a.target),
|
||||
target = str(a.target)
|
||||
if target.endswith('.'):
|
||||
# target is f.e. talk.google.com. remove last dot
|
||||
target = target[:-1]
|
||||
hosts.append({'host': target,
|
||||
'port': int(a.port),
|
||||
'prio': int(a.priority),
|
||||
'weight': int(a.weight)})
|
||||
|
|
Loading…
Reference in New Issue