Skip to content

Commit

Permalink
Replace list(filter()) and lambda with list comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigc committed Jan 17, 2017
1 parent 835c995 commit cd42762
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion master/buildbot/test/unit/test_worker_openstack.py
Expand Up @@ -152,7 +152,7 @@ def test_getImage_string(self):
@defer.inlineCallbacks
def test_getImage_callable(self):
def image_callable(images):
filtered = list(filter(lambda i: i.id == 'uuid1', images))
filtered = [i for i in images if i.id == 'uuid1']
return filtered[0].id

bs = openstack.OpenStackLatentWorker('bot', 'pass', flavor=1,
Expand Down

0 comments on commit cd42762

Please sign in to comment.