Skip to content

Commit

Permalink
Windows: success return of model run always true; BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
MuellerSeb committed Mar 22, 2020
1 parent 807b09c commit daa4c5b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ogs5py/ogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ def run_model(
Returns
-------
success : bool
State if OGS5 terminated 'normally'.
State if OGS5 terminated 'normally'. (Allways true on Windows.)
"""
# look for the standard ogs executable in the standard-path
if ogs_exe is None:
Expand Down Expand Up @@ -1179,8 +1179,11 @@ def run_model(
child.expect(pexpect.EOF)
if sys.platform != "win32":
child.close()
self.exitstatus = child.exitstatus
success = self.exitstatus == 0
self.exitstatus = child.exitstatus
success = self.exitstatus == 0
else:
# on windows, this exitstatus is wrongly false
success = True
# close the output stream
out.close()

Expand Down

0 comments on commit daa4c5b

Please sign in to comment.