Skip to content

Commit

Permalink
tmpdir
Browse files Browse the repository at this point in the history
Signed-off-by: Lou DeGenaro <[email protected]>
  • Loading branch information
degenaro committed Dec 3, 2024
1 parent 17fbd01 commit 00cc192
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions trestle/tasks/cis_xlsx_to_oscal_cd.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,15 @@ def _execute(self) -> TaskOutcome:
if not overwrite and pathlib.Path(ofile).exists():
logger.warning(f'output: {ofile} already exists')
return TaskOutcome('failure')
with self._get_tempdir() as self._tmpdir:
with self._get_tempdir() as tmpdir:
# step 1 - add combined sheet, if needed
combine_helper = CombineHelper(self.config_object, self._tmpdir)
combine_helper = CombineHelper(self.config_object, tmpdir)
combine_helper.run()
# step 2 - create trestle ready csv file from xlsx file
xlsx_to_csv_helper = XlsxToCsvHelper(self.config_object, self._tmpdir)
xlsx_to_csv_helper = XlsxToCsvHelper(self.config_object, tmpdir)
xlsx_to_csv_helper.run()
# step 3 - create OSCAL json file from csv file
csv_to_json_helper = CsvToJsonHelper(self.config_object, self._tmpdir)
csv_to_json_helper = CsvToJsonHelper(self.config_object, tmpdir)
task_outcome = csv_to_json_helper.run()
return task_outcome
# failure
Expand Down

0 comments on commit 00cc192

Please sign in to comment.