Fix missing data in CSV output

Closes issue #128
This commit is contained in:
Sean Whalen
2019-11-25 11:07:31 -05:00
parent 747d22358f
commit d3f25c9447
3 changed files with 9 additions and 4 deletions
+5
View File
@@ -1,3 +1,8 @@
6.7.2
-----
- Fix SPF results field in CSV output (closes issue #128)
6.7.1
-----
+3 -3
View File
@@ -33,7 +33,7 @@ from parsedmarc.utils import is_outlook_msg, convert_outlook_msg
from parsedmarc.utils import timestamp_to_human, human_timestamp_to_datetime
from parsedmarc.utils import parse_email
__version__ = "6.7.1"
__version__ = "6.7.2"
logging.basicConfig(
format='%(levelname)8s:%(filename)s:%(lineno)d:'
@@ -501,12 +501,12 @@ def parsed_aggregate_reports_to_csv_rows(reports):
spf_results.append(spf_result["result"])
row["spf_domains"] = ",".join(map(to_str, spf_domains))
row["spf_scopes"] = ",".join(map(to_str, spf_scopes))
row["spf_results"] = ",".join(map(to_str, dkim_results))
row["spf_results"] = ",".join(map(to_str, spf_results))
rows.append(row)
for r in rows:
for k, v in r.items():
if type(v) is not str:
if type(v) not in [str, int, bool]:
r[k] = ''
return rows
+1 -1
View File
@@ -14,7 +14,7 @@ from setuptools import setup
from codecs import open
from os import path
__version__ = "6.7.1"
__version__ = "6.7.2"
description = "A Python package and CLI for parsing aggregate and " \
"forensic DMARC reports"