Apache DataFusion SQL Query Engine
ARROW-7674: [Dev] Add helpful message for captcha challenge in merge_arrow_pr.py
Brian Hulette9840ecfb061a
diff --git a/dev/merge_arrow_pr.py b/dev/merge_arrow_pr.pyindex 7373f3ade1..ecbda09056 100755--- a/dev/merge_arrow_pr.py+++ b/dev/merge_arrow_pr.py@@ -47,6 +47,7 @@ import sixtry:import jira.client+ import jira.exceptionsexcept ImportError:print("Could not find jira library. ""Run 'sudo pip install jira' to install.")@@ -516,8 +517,20 @@ def get_credentials(cmd):def connect_jira(cmd):- return jira.client.JIRA({'server': JIRA_API_BASE},- basic_auth=get_credentials(cmd))+ try:+ return jira.client.JIRA({'server': JIRA_API_BASE},+ basic_auth=get_credentials(cmd))+ except jira.exceptions.JIRAError as e:+ if "CAPTCHA_CHALLENGE" in e.text:+ print("")+ print("It looks like you need to answer a captcha challenge for "+ "this account (probably due to a login attempt with an "+ "incorrect password). Please log in at "+ "https://issues.apache.org/jira and complete the captcha "+ "before running this tool again.")+ print("Exiting.")+ sys.exit(1)+ raise edef get_pr_num():