diff --git a/parsedmarc/cli.py b/parsedmarc/cli.py index 1a5f69e..0a5d895 100644 --- a/parsedmarc/cli.py +++ b/parsedmarc/cli.py @@ -496,7 +496,9 @@ def _main(): elastic.set_hosts(opts.elasticsearch_hosts, opts.elasticsearch_ssl, opts.elasticsearch_ssl_cert_path, - timeout=opts.elasticsearch_timeout,elesticsearch_username,elasticsearch_password) + opts.elesticsearch_username, + opts.elasticsearch_password, + timeout=opts.elasticsearch_timeout) elastic.migrate_indexes(aggregate_indexes=[es_aggregate_index], forensic_indexes=[es_forensic_index]) except elastic.ElasticsearchError as error: diff --git a/parsedmarc/elastic.py b/parsedmarc/elastic.py index 695f678..6e9b654 100644 --- a/parsedmarc/elastic.py +++ b/parsedmarc/elastic.py @@ -171,7 +171,7 @@ class AlreadySaved(ValueError): """Raised when a report to be saved matches an existing report""" -def set_hosts(hosts, use_ssl=False, ssl_cert_path=None, timeout=60.0, username, password): +def set_hosts(hosts, use_ssl=False, ssl_cert_path=None, username=None, password=None, timeout=60.0): """ Sets the Elasticsearch hosts to use