remove last dot (which is RFC possiblity) the dnspython way. thank Bob Halley
This commit is contained in:
parent
eae33b3677
commit
9e85df37b1
|
@ -1584,10 +1584,9 @@ class Connection:
|
|||
answers = [x for x in dns.resolver.query(query, 'SRV')]
|
||||
if answers:
|
||||
for a in answers:
|
||||
target = str(a.target)
|
||||
if target.endswith('.'):
|
||||
target = dns.name.from_text(str(a.target))
|
||||
# target is f.e. talk.google.com. remove last dot
|
||||
target = target[:-1]
|
||||
target = target.to_text(omit_final_dot = True)
|
||||
hosts.append({'host': target,
|
||||
'port': int(a.port),
|
||||
'prio': int(a.priority),
|
||||
|
|
Loading…
Reference in New Issue