diff --git a/main.py b/main.py index 9392d61..343cc6c 100644 --- a/main.py +++ b/main.py @@ -32,10 +32,12 @@ def main(): answer = r.resolve(qname=zone, rdtype='DNSKEY', tcp=False, search=ns) if not expected: expected = answer.rrset.to_text() - # print(f"set {expected=}") + expected = expected[expected.find('IN ')] else: - if answer.rrset.to_text() != expected: - logging.debug(f"{answer.rrset.to_text()=} differs from {expected=}") + answer_text = answer.rrset.to_text() + answer_text = answer_text[answer_text.find('IN ')] + if answer_text != expected: + logging.debug(f"'{answer_text}' differs from '{expected}', bumping SOA record for {zone}") # I'm very confident this is more complicated than it needs to be... db.query(f"""SELECT id,content FROM records WHERE type='SOA' AND name='{zone}'""") result = db.store_result()