Skip to content

Commit

Permalink
Replace filter(lambda with list comprehension.
Browse files Browse the repository at this point in the history
filter() returns an iterable on Python 3, not a list
  • Loading branch information
rodrigc committed Jan 17, 2017
1 parent cd42762 commit 85987af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion master/buildbot/test/unit/test_changes_gitpoller.py
Expand Up @@ -152,7 +152,7 @@ def test_get_commit_files_with_space_in_changed_files(self):
['log', '--name-only', '--no-walk',
'--format=%n', self.dummyRevStr, '--'],
filesStr,
filter(lambda x: x.strip(), filesStr.splitlines(), ),
[l for l in filesStr.splitlines() if l.strip()],
emptyRaisesException=False,
)

Expand Down

0 comments on commit 85987af

Please sign in to comment.