Skip to content

Commit

Permalink
fix log message to avoid accessing unparse msg object
Browse files Browse the repository at this point in the history
  • Loading branch information
jertel committed Dec 21, 2022
1 parent 5adc332 commit 293a604
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dmarc2logstash.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ def download(server, username, password, jsonOutputFile, timeout, shouldDelete,
else:
failure = failure + 1
if isTrue(shouldDeleteFailures):
log.info("Removing failed email message; it is not a DMARC report; messageIdx=%d; messageSubject=\"%s\"; messageSender=\"%s\"" % (i, msg.get('subject'), msg.get('from')))
log.info("Removing failed email message; it is not a DMARC report; messageIdx=%d" % (i))
conn.dele(i)
else:
log.info("Preserving failed email message; it is not a DMARC report; messageIdx=%d; messageSubject=\"%s\"; messageSender=\"%s\"" % (i, msg.get('subject'), msg.get('from')))
log.info("Preserving failed email message; it is not a DMARC report; messageIdx=%d" % (i))

log.info("DMARC Results; successfulDmarcEmailCount=%d; skippedEmailCount=%d" % (success, failure))
conn.quit()
Expand Down

0 comments on commit 293a604

Please sign in to comment.