Skip to content

Commit

Permalink
better checking for ogs success
Browse files Browse the repository at this point in the history
  • Loading branch information
MuellerSeb committed Aug 9, 2019
1 parent d3e0594 commit 143d0ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ogs5py/ogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1144,15 +1144,16 @@ def run_model(
" ".join(args),
timeout=timeout,
logfile=out,
encoding=out.encoding,
cwd=os.path.abspath(self.task_root),
)
# wait for ogs to finish
child.expect(pexpect.EOF)
child.close()
success = child.exitstatus == 0
# close the output stream
out.close()

success = "Simulation time" in out.last_line

if not save_log:
os.remove(log)

Expand Down

0 comments on commit 143d0ab

Please sign in to comment.