diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py index 3a7fc4c..5bc909f 100644 --- a/parsedmarc/__init__.py +++ b/parsedmarc/__init__.py @@ -52,6 +52,7 @@ MAGIC_XML = b"\x3c\x3f\x78\x6d\x6c\x20" DNS_CACHE = dict() + class ParserError(RuntimeError): """Raised whenever the parser fails for some reason""" @@ -213,8 +214,6 @@ def parse_aggregate_report_xml(xml, nameservers=None, timeout=2.0): """ errors = [] - DNS_CACHE = dict() - try: xmltodict.parse(xml)["feedback"] except Exception as e: