From be359eabbbbf8269a5fa3aebaef17cec48c44176 Mon Sep 17 00:00:00 2001 From: Prashanth Pai Date: Tue, 8 Oct 2013 11:57:36 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/6051 Reviewed-by: Luis Pabon Tested-by: Luis Pabon --- swiftkerbauth/kerbauth.py | 8 ++++++-- 1 file 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, \ -- cgit