fix: [stix1 export] Indentation issues caused STIX1 result files not to be written

misp-stix
chrisr3d 2021-11-05 14:13:29 +01:00
parent ab3c97718a
commit 6dd645dfc7
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 2 additions and 2 deletions

View File

@ -55,8 +55,8 @@ def _process_misp_files(scope: str, orgname: str, version: str, return_format:st
parser = parser(orgname, version)
for name in input_names:
parser.parse_json_content(name)
with open(f'{name}.out', 'wt', encoding='utf-8') as f:
f.write(globals()[f'_get_{return_format}_events'](parser.stix_package))
with open(f'{name}.out', 'wt', encoding='utf-8') as f:
f.write(globals()[f'_get_{return_format}_events'](parser.stix_package))
errors = parser.errors
if errors:
_handle_errors(errors)