summaryrefslogtreecommitdiffstats
path: root/swiftkerbauth/kerbauth.py
diff options
context:
space:
mode:
authorPrashanth Pai <ppai@redhat.com>2013-10-08 11:57:36 +0530
committerLuis Pabon <lpabon@redhat.com>2013-10-09 04:25:21 -0700
commitbe359eabbbbf8269a5fa3aebaef17cec48c44176 (patch)
tree8c2c1a85b2ac7b0c95fedf726fa1c157124ba219 /swiftkerbauth/kerbauth.py
parenta920ebbdbfe97f3a221b3578bef1505a3700b13d (diff)
Use HTTPFound if HTTPSeeOther doesn't exist in swob
This is a temporary fix to run unit tests. HTTPSeeOther has been added to swift codebase but is not present in swift 1.9.1 Change-Id: I38207a76c38aa091e790ad0b5e1253505fbc8fb8 Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/6051 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
Diffstat (limited to 'swiftkerbauth/kerbauth.py')
-rw-r--r--swiftkerbauth/kerbauth.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/swiftkerbauth/kerbauth.py b/swiftkerbauth/kerbauth.py
index a37f1f6..323a677 100644
--- a/swiftkerbauth/kerbauth.py
+++ b/swiftkerbauth/kerbauth.py
@@ -17,8 +17,12 @@ from traceback import format_exc
from eventlet import Timeout
from swift.common.swob import Request
-from swift.common.swob import HTTPBadRequest, HTTPForbidden, HTTPNotFound, \
- HTTPSeeOther
+from swift.common.swob import HTTPBadRequest, HTTPForbidden, HTTPNotFound
+
+try:
+ from swift.common.swob import HTTPSeeOther
+except ImportError:
+ from swift.common.swob import HTTPFound as HTTPSeeOther
from swift.common.middleware.acl import clean_acl, parse_acl, referrer_allowed
from swift.common.utils import cache_from_env, get_logger, \