Skip to content

Commit

Permalink
Merge pull request #28 from jesusvasquez333/fix_exit_calls
Browse files Browse the repository at this point in the history
Replace calls to `exit` for `sys.exit`
  • Loading branch information
jesusvasquez333 authored Mar 6, 2021
2 parents cfca03e + 82e56ee commit 9bafd1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ COPY verify_pr_lables.py /verify_pr_lables.py

# Force stdin, stdout and stderr to be totally unbuffered.
# This warranty the order of output messages send to the console
ENV PYTHONUNBUFFERED 1
ENV PYTHONUNBUFFERED=1

ENTRYPOINT ["/verify_pr_lables.py"]
6 changes: 3 additions & 3 deletions verify_pr_lables.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def get_env_var(env_var_name, echo_value=False):
# If reviews are disable, exit with an error code.
if pr_reviews_disabled:
print('Exiting with an error code')
exit(1)
sys.exit(1)

# If there has been already a request for changes due to the presence of
# invalid labels, then we don't request changes again.
Expand All @@ -231,7 +231,7 @@ def get_env_var(env_var_name, echo_value=False):
# If reviews are disable, exit with an error code.
if pr_reviews_disabled:
print('Exiting with an error code')
exit(1)
sys.exit(1)

# If there has been already a request for changes due to missing a valid
# label, then don't request changes again.
Expand All @@ -255,7 +255,7 @@ def get_env_var(env_var_name, echo_value=False):
# If reviews are disable, exit without an error code.
if pr_reviews_disabled:
print('Exiting without an error code')
exit(0)
sys.exit(0)

# If the latest review done was approved, then don't approved it again.
if last_review_approved:
Expand Down

0 comments on commit 9bafd1d

Please sign in to comment.