1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-13 17:17:23 +01:00

Quick hack for TypeError raise in dnspython

This commit is contained in:
George T. Gougoudis
2016-09-21 17:37:28 +03:00
parent 102b2d46ab
commit 26ffcadba9
2 changed files with 24 additions and 3 deletions

View File

@@ -680,7 +680,14 @@ def query_dns(qname, rtype, nxdomain='[Not Set]', at=None):
# periods from responses since that's how qnames are encoded in DNS but is
# confusing for us. The order of the answers doesn't matter, so sort so we
# can compare to a well known order.
return "; ".join(sorted(str(r).rstrip('.') for r in response))
addresses = list()
for r in response:
try:
addresses.append(str(r).rstrip('.'))
except TypeError:
addresses.append(r.to_text().decode('utf8').rstrip('.'))
return "; ".join(sorted(addresses))
def check_ssl_cert(domain, rounded_time, ssl_certificates, env, output):
# Check that TLS certificate is signed.