Merge pull request #1680 from npalix/dnsdiag

diagnosis: Support multiple TXT entries for TLD
This commit is contained in:
Alexandre Aubin 2023-06-20 16:35:14 +02:00 committed by GitHub
commit 4da98e74ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -182,6 +182,10 @@ class MyDiagnoser(Diagnoser):
if success != "ok":
return None
else:
if type_ == "TXT" and isinstance(answers,list):
for part in answers:
if part.startswith('"v=spf1'):
return part
return answers[0] if len(answers) == 1 else answers
def current_record_match_expected(self, r):