From bb722e651aaaa138ce4dbf8bd44ca348bd843851 Mon Sep 17 00:00:00 2001 From: Sean Whalen <44679+seanthegeek@users.noreply.github.com> Date: Thu, 24 Oct 2024 17:14:02 -0400 Subject: [PATCH] Fix parsing when auth record is missing --- parsedmarc/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py index 3fa334b..7079176 100644 --- a/parsedmarc/__init__.py +++ b/parsedmarc/__init__.py @@ -169,7 +169,7 @@ def _parse_report_record( else: lowered_from = "" new_record["identifiers"]["header_from"] = lowered_from - if record["auth_results"] is not None: + if isinstance(record["auth_results"], dict): auth_results = record["auth_results"].copy() if "spf" not in auth_results: auth_results["spf"] = []