mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-06-05 02:19:43 +00:00
PEP 8 fixes
This commit is contained in:
@@ -1284,10 +1284,10 @@ def save_output(results, output_directory="output",
|
||||
Args:
|
||||
results (OrderedDict): Parsing results
|
||||
output_directory (str): The patch to the directory to save in
|
||||
aggregate_json_filename (str): Output filename for the aggregate JSON report
|
||||
forensic_json_filename (str): Output filename for the forensic JSON report
|
||||
aggregate_csv_filename (str): Output filename for the aggregate CSV report
|
||||
forensic_csv_filename (str): Output filename for the forensic CSV report
|
||||
aggregate_json_filename (str): Filename for the aggregate JSON file
|
||||
forensic_json_filename (str): Filename for the forensic JSON file
|
||||
aggregate_csv_filename (str): Filename for the aggregate CSV file
|
||||
forensic_csv_filename (str): Filename for the forensic CSV file
|
||||
"""
|
||||
|
||||
aggregate_reports = results["aggregate_reports"]
|
||||
|
||||
+8
-4
@@ -303,13 +303,17 @@ def _main():
|
||||
if "output" in general_config:
|
||||
opts.output = general_config["output"]
|
||||
if "aggregate_json_filename" in general_config:
|
||||
opts.aggregate_json_filename = general_config["aggregate_json_filename"]
|
||||
opts.aggregate_json_filename = general_config[
|
||||
"aggregate_json_filename"]
|
||||
if "forensic_json_filename" in general_config:
|
||||
opts.forensic_json_filename = general_config["forensic_json_filename"]
|
||||
opts.forensic_json_filename = general_config[
|
||||
"forensic_json_filename"]
|
||||
if "aggregate_csv_filename" in general_config:
|
||||
opts.aggregate_csv_filename = general_config["aggregate_csv_filename"]
|
||||
opts.aggregate_csv_filename = general_config[
|
||||
"aggregate_csv_filename"]
|
||||
if "forensic_csv_filename" in general_config:
|
||||
opts.forensic_csv_filename = general_config["forensic_csv_filename"]
|
||||
opts.forensic_csv_filename = general_config[
|
||||
"forensic_csv_filename"]
|
||||
if "nameservers" in general_config:
|
||||
opts.nameservers = _str_to_list(general_config["nameservers"])
|
||||
if "dns_timeout" in general_config:
|
||||
|
||||
@@ -301,8 +301,10 @@ def save_aggregate_report_to_elasticsearch(aggregate_report,
|
||||
org_name = metadata["org_name"]
|
||||
report_id = metadata["report_id"]
|
||||
domain = aggregate_report["policy_published"]["domain"]
|
||||
begin_date = human_timestamp_to_datetime(metadata["begin_date"], to_utc=True)
|
||||
end_date = human_timestamp_to_datetime(metadata["end_date"], to_utc=True)
|
||||
begin_date = human_timestamp_to_datetime(metadata["begin_date"],
|
||||
to_utc=True)
|
||||
end_date = human_timestamp_to_datetime(metadata["end_date"],
|
||||
to_utc=True)
|
||||
begin_date_human = begin_date.strftime("%Y-%m-%d %H:%M:%SZ")
|
||||
end_date_human = end_date.strftime("%Y-%m-%d %H:%M:%SZ")
|
||||
if monthly_indexes:
|
||||
|
||||
Reference in New Issue
Block a user