Skip to content

Commit

Permalink
Fix incorrect return value, use exit code instead of stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
flomnes committed Jan 16, 2024
1 parent 17b16ca commit dd875ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/antares_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ def launch_solver(solver_path, study_path, use_ortools = False, ortools_solver =
command.append('--named-mps-problems')

process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=None)
output = process.communicate()
stdout, stderr = subprocess.communicate()
exit_code = subprocess.wait()

return "Solver returned error" not in output[0].decode('iso-8859-1')
return (exit_code == 0)

def generate_reference_values(solver_path, path, use_ortools, ortools_solver, named_mps_problems):

Expand Down

0 comments on commit dd875ee

Please sign in to comment.