mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-02-17 07:03:58 +00:00
Fix #638
This commit is contained in:
@@ -1510,7 +1510,7 @@ def parse_report_email(
|
||||
if isinstance(payload, bytes):
|
||||
payload = payload.decode("utf-8", errors="replace")
|
||||
if payload.strip().startswith("{"):
|
||||
smtp_tls_report = parse_smtp_tls_report_json(payload)
|
||||
result = parse_smtp_tls_report_json(payload)
|
||||
result = OrderedDict(
|
||||
[("report_type", "smtp_tls"), ("report", smtp_tls_report)]
|
||||
)
|
||||
|
||||
@@ -1481,7 +1481,7 @@ def _main():
|
||||
pbar.update(counter - pbar.n)
|
||||
|
||||
for result in results:
|
||||
if type(result[0]) is ParserError:
|
||||
if isinstance(result[0], ParserError) or result[0] is None:
|
||||
logger.error("Failed to parse {0} - {1}".format(result[1], result[0]))
|
||||
else:
|
||||
if result[0]["report_type"] == "aggregate":
|
||||
|
||||
Reference in New Issue
Block a user