Skip to content
Snippets Groups Projects
Commit 48817cc1 authored by Holden Karau's avatar Holden Karau Committed by Sean Owen
Browse files

[SPARK-10497] [BUILD] [TRIVIAL] Handle both locations for JIRAError with python-jira

Location of JIRAError has moved between old and new versions of python-jira package.
Longer term it probably makes sense to pin to specific versions (as mentioned in https://issues.apache.org/jira/browse/SPARK-10498 ) but for now, making release tools works with both new and old versions of python-jira.

Author: Holden Karau <holden@pigscanfly.ca>

Closes #8661 from holdenk/SPARK-10497-release-utils-does-not-work-with-new-jira-python.
parent 1dc7548c
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,11 @@ from subprocess import Popen, PIPE
try:
from jira.client import JIRA
from jira.exceptions import JIRAError
# Old versions have JIRAError in exceptions package, new (0.5+) in utils.
try:
from jira.exceptions import JIRAError
except ImportError:
from jira.utils import JIRAError
except ImportError:
print "This tool requires the jira-python library"
print "Install using 'sudo pip install jira'"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment