diff options
author | Holden Karau <holden@pigscanfly.ca> | 2015-09-10 16:42:12 +0200 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2015-09-10 16:42:12 +0200 |
commit | 48817cc111a9705f40b7c842315eee24291c2198 (patch) | |
tree | 1c2985799443c4b10558d1d20ecbfeebefa63ff0 /dev/create-release | |
parent | 1dc7548c598c4eb4ecc7d5bb8962a735bbd2c0f7 (diff) | |
download | spark-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/create-release')
-rwxr-xr-x | dev/create-release/releaseutils.py | 6 |
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'" |