diff --git a/swift/auth/server.py b/swift/auth/server.py index 2e6d2d7db0..3e1ef881f4 100644 --- a/swift/auth/server.py +++ b/swift/auth/server.py @@ -517,9 +517,8 @@ YOU HAVE A FEW OPTIONS: :param request: A webob.Request instance. """ try: - pathsegs = \ - split_path(request.path, minsegs=1, maxsegs=3, - rest_with_last=True) + pathsegs = split_path(request.path, minsegs=1, maxsegs=3, + rest_with_last=True) except ValueError: return HTTPBadRequest() if pathsegs[0] == 'v1' and pathsegs[2] == 'auth': diff --git a/swift/common/middleware/auth.py b/swift/common/middleware/auth.py index b60c95278d..1278a4a67a 100644 --- a/swift/common/middleware/auth.py +++ b/swift/common/middleware/auth.py @@ -85,7 +85,7 @@ class DevAuth(object): try: version, rest = split_path(env.get('PATH_INFO', ''), 1, 2, True) - except ValueError, err: + except ValueError: return HTTPNotFound()(env, start_response) if rest and rest.startswith(self.reseller_prefix): # Handle anonymous access to accounts I'm the definitive @@ -106,10 +106,10 @@ class DevAuth(object): def get_groups(self, token, memcache_client=None): """ Get groups for the given token. - + If memcache_client is set, token credentials will be cached appropriately. - + With a cache miss, or no memcache_client, the configurated external authentication server will be queried for the group information.