Skip to content

Commit

Permalink
Add workaround for python 3.8. Probably want to remove support for th…
Browse files Browse the repository at this point in the history
…at soon.
  • Loading branch information
cyberw committed Nov 18, 2023
1 parent 7a86d40 commit fb3947e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions locust/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,9 @@ def sigint_handler(_signal, _frame):
# nothing more to do, just wait for the children to exit
for child_pid in children:
_, child_status = os.waitpid(child_pid, 0)
child_exit_code = os.waitstatus_to_exitcode(child_status)
exit_code = max(exit_code, child_exit_code)
if sys.version_info >= (3, 8): # dammit python 3.8...
child_exit_code = os.waitstatus_to_exitcode(child_status)
exit_code = max(exit_code, child_exit_code)
sys.exit(exit_code)
else:
options.master = True
Expand Down

0 comments on commit fb3947e

Please sign in to comment.