Merge "Py3: We cannot use len(filter(...))"
This commit is contained in:
commit
c9dd7efb81
@ -147,8 +147,7 @@ class FakeSwift(object):
|
||||
def register(self, method, path, response_class, headers, body):
|
||||
# assuming the path format like /v1/account/container/object
|
||||
resource_map = ['account', 'container', 'object']
|
||||
acos = filter(None, split_path(path, 0, 4, True)[1:])
|
||||
index = len(acos) - 1
|
||||
index = len(list(filter(None, split_path(path, 0, 4, True)[1:]))) - 1
|
||||
resource = resource_map[index]
|
||||
if (method, path) in self._responses:
|
||||
old_headers = self._responses[(method, path)][1]
|
||||
|
Loading…
Reference in New Issue
Block a user