Skip to content

Commit

Permalink
Merge pull request #21 from molssi-seamm/dev
Browse files Browse the repository at this point in the history
Better support for rerunning/restarting jobs
  • Loading branch information
seamm authored Apr 24, 2023
2 parents d8b92c9 + 70b8f5f commit aa44a41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
History
=======

2023.4.24 -- Better support for rerunning/restarting jobs
* Remove 'iteration.out' if it already exists.

2023.2.15 -- Starting to add loops over structures in the database

* Reorganized the documentation and changed to the standard MolSSI theme.
Expand Down
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 aa44a41

Please sign in to comment.