handle server names with embeded ports
parent
2221a13a4d
commit
fe6832fae8
|
@ -15,6 +15,10 @@ import argparse
|
|||
import logging
|
||||
|
||||
def get_targets(server_name):
|
||||
if ":" in server_name:
|
||||
target, port = server_name.split(":")
|
||||
yield (target, int(port))
|
||||
return
|
||||
try:
|
||||
answers = dns.resolver.query("_matrix._tcp." + server_name, "SRV")
|
||||
for srv in answers:
|
||||
|
|
Loading…
Reference in New Issue