Skip to content

Commit

Permalink
Merge pull request #665 from jnschulze/master
Browse files Browse the repository at this point in the history
Exit with code 1 on greenlet exceptions
  • Loading branch information
heyman authored Oct 21, 2019
2 parents 5c7f264 + 0f2338a commit 24e0a8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion locust/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def sig_term_handler():
logger.info("Starting Locust %s" % version)
main_greenlet.join()
code = 0
if len(runners.locust_runner.errors):
if len(runners.locust_runner.errors) or main_greenlet.exception:
code = options.exit_code_on_error
shutdown(code=code)
except KeyboardInterrupt as e:
Expand Down

0 comments on commit 24e0a8e

Please sign in to comment.