From 36e070ca704b1a3b23926f7f6536940596f281dd Mon Sep 17 00:00:00 2001 From: chrisr3d Date: Mon, 19 Oct 2020 11:40:16 +0200 Subject: [PATCH] fix: [tools] Variable names typo --- tools/ingest_stix/ingest_stix.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/ingest_stix/ingest_stix.py b/tools/ingest_stix/ingest_stix.py index 1a66a2cdf..f18bd3bb3 100644 --- a/tools/ingest_stix/ingest_stix.py +++ b/tools/ingest_stix/ingest_stix.py @@ -10,8 +10,8 @@ def ingest_to_misp(path, version, url, key, verifycert): return f'Unable to connect to MISP ({url}). Please make sure the API key and the URL are correct.' errors = [] - for filename in args.path: - response = misp.upload_stix(filename, version=args.version) + for filename in path: + response = misp.upload_stix(filename, version=version) if response.status_code != 200: errors.append(filename) @@ -19,7 +19,7 @@ def ingest_to_misp(path, version, url, key, verifycert): file = "file: " if len(errors) == 1 else "files:\n- " print_errors = '\n- '.join(errors) return f'Error with the ingestion of the following {file}{print_errors}' - return f'Successfully ingested {len(args.path)} STIX {args.version} files.' + return f'Successfully ingested {len(path)} STIX {version} files.' if __name__ == '__main__':