Skip to content

Commit

Permalink
[parser] Don't fail on empty auth_results elements
Browse files Browse the repository at this point in the history
Fixes: #41
  • Loading branch information
nhairs committed Oct 12, 2024
1 parent c37573f commit 1fc0d81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/parsedmarc/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,8 @@ def _parse_aggregate_report_record(self, record: dict) -> dict:
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"] = []
Expand Down

0 comments on commit 1fc0d81

Please sign in to comment.