Skip to content

Commit

Permalink
testing evolution termination
Browse files Browse the repository at this point in the history
  • Loading branch information
gautam-404 committed Oct 20, 2024
1 parent 6235313 commit 331258d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mesaport/ProjectOps/ops_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ def run_subprocess(commands, wdir, silent=True, runlog='', status=None,
if "termination code:" in outline:
evo_terminated = True
termination_code = outline.split()[-1]
if "cannot find acceptable model" in outline:
termination_code = 'cannot find acceptable model'
evo_terminated = False
if "photo" in outline and "does not exist" in outline:
evo_terminated = True
termination_code = "photo does not exist"
Expand Down Expand Up @@ -120,7 +123,7 @@ def run_subprocess(commands, wdir, silent=True, runlog='', status=None,
if proc.returncode or error:
print('The process raised an error:', proc.returncode, error)
return False
elif evo_terminated and termination_code == None:
elif evo_terminated and termination_code != None:
return False
else:
if gyre_in is None:
Expand Down

0 comments on commit 331258d

Please sign in to comment.