Yet more debugging

This commit is contained in:
Sean Whalen
2018-03-24 18:46:50 -04:00
parent 0392675a07
commit f755696df0
2 changed files with 2 additions and 1 deletions

View File

@@ -25,9 +25,11 @@ def _main():
if args.save_aggregate:
for report in reports_["aggregate_reports"]:
elastic.save_aggregate_report_to_elasticsearch(report)
sleep(1)
if args.save_forensic:
for report in reports_["forensic_reports"]:
elastic.save_forensic_report_to_elasticsearch(report)
sleep(1)
except elastic.AlreadySaved as error_:
logger.warning(error_.__str__())
except ElasticsearchException as error_:

View File

@@ -202,7 +202,6 @@ def save_aggregate_report_to_elasticsearch(aggregate_report):
search = aggregate_index.search()
search.query = org_name_query & report_id_query & domain_query
print(search.to_dict())
existing = search.execute()
if len(existing) > 0:
raise AlreadySaved("Aggregate report ID {0} from {1} about {2} "