diff --git a/src/execution/logging.py b/src/execution/logging.py index 4beed206..f5a92b82 100644 --- a/src/execution/logging.py +++ b/src/execution/logging.py @@ -367,7 +367,7 @@ def create_filename(self, execution_id, all_audit_names, script_name, start_time if not filename.lower().endswith('.log'): filename += '.log' - filename = filename.replace(" ", "_") + filename = filename.replace(" ", "_").replace("/", "_") return filename diff --git a/src/tests/execution_filename_test.py b/src/tests/execution_filename_test.py index 8a8420f2..4ac1ca1c 100644 --- a/src/tests/execution_filename_test.py +++ b/src/tests/execution_filename_test.py @@ -12,8 +12,8 @@ def test_default_format(self): self.assertEqual(filename, 'my_script_bugy_180506_083026.log') def test_custom_date_format(self): - filename = self.create_filename(date_format='xx%y/%m/%d-%fxx') - self.assertEqual(filename, 'my_script_bugy_xx18/05/06-234000xx.log') + filename = self.create_filename(date_format='xx%y-%m-%d_%fxx') + self.assertEqual(filename, 'my_script_bugy_xx18-05-06_234000xx.log') def test_custom_name_id_only(self): filename = self.create_filename(filename_pattern='$ID')