aboutsummaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorHolden Karau <holden@pigscanfly.ca>2015-09-10 16:42:12 +0200
committerSean Owen <sowen@cloudera.com>2015-09-10 16:42:12 +0200
commit48817cc111a9705f40b7c842315eee24291c2198 (patch)
tree1c2985799443c4b10558d1d20ecbfeebefa63ff0 /dev
parent1dc7548c598c4eb4ecc7d5bb8962a735bbd2c0f7 (diff)
downloadspark-48817cc111a9705f40b7c842315eee24291c2198.tar.gz
spark-48817cc111a9705f40b7c842315eee24291c2198.tar.bz2
spark-48817cc111a9705f40b7c842315eee24291c2198.zip
[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.
Diffstat (limited to 'dev')
-rwxr-xr-xdev/create-release/releaseutils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/dev/create-release/releaseutils.py b/dev/create-release/releaseutils.py
index 51ab25a6a5..7f152b7f53 100755
--- a/dev/create-release/releaseutils.py
+++ b/dev/create-release/releaseutils.py
@@ -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'"