diff --git a/Dockerfile b/Dockerfile index 447da8c..9c20a17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/verify_pr_lables.py b/verify_pr_lables.py index f7bc6a3..0457746 100755 --- a/verify_pr_lables.py +++ b/verify_pr_lables.py @@ -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. @@ -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. @@ -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: