small cleanup stuff

This commit is contained in:
David Goetz
2010-11-01 15:13:38 -07:00
parent 1f09bb6720
commit d722a2884e
2 changed files with 5 additions and 6 deletions

View File

@@ -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':

View File

@@ -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.