Skip to content

Commit

Permalink
Fix stage checking
Browse files Browse the repository at this point in the history
  • Loading branch information
a-ws-m committed Sep 20, 2023
1 parent 3971e5d commit d38deb6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mdpow/restart.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ def completed(self, stage):

def start(self, stage):
"""Record that *stage* is starting."""
if self.current is not None:
errmsg = "Cannot start stage %s because previously started stage %s " \
if self.current is not None and self.current != stage:
errmsg = (
"Cannot start stage %s because previously started stage %s "
"has not been completed." % (stage, self.current)
logger.error(errmsg)
raise JournalSequenceError(errmsg)
Expand Down

0 comments on commit d38deb6

Please sign in to comment.