Skip to content

Commit

Permalink
Removed iteration.out when rerun.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulsaxe committed Apr 24, 2023
1 parent d8b92c9 commit 0891e4c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion loop_step/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,9 @@ def run(self):
if self._file_handler is not None:
self._file_handler.close()
job.removeHandler(self._file_handler)
self._file_handler = logging.FileHandler(iter_dir / "iteration.out")
path = iter_dir / "iteration.out"
path.unlink(missing_ok=True)
self._file_handler = logging.FileHandler(path)
self._file_handler.setLevel(printing.NORMAL)
formatter = logging.Formatter(fmt="{message:s}", style="{")
self._file_handler.setFormatter(formatter)
Expand Down

0 comments on commit 0891e4c

Please sign in to comment.