[diffoscope] 01/01: Fix lazy expression, filter is lazy in python 3
Ximin Luo
infinity0 at debian.org
Fri Jan 27 16:23:50 CET 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository diffoscope.
commit 737fc3be9130f4b07d8c9e932f24ba5f8f8a4153
Author: Ximin Luo <infinity0 at debian.org>
Date: Fri Jan 27 16:23:25 2017 +0100
Fix lazy expression, filter is lazy in python 3
---
diffoscope/comparators/utils/specialize.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/diffoscope/comparators/utils/specialize.py b/diffoscope/comparators/utils/specialize.py
index ecb3101..7a3c3e9 100644
--- a/diffoscope/comparators/utils/specialize.py
+++ b/diffoscope/comparators/utils/specialize.py
@@ -40,7 +40,7 @@ def specialize(file):
else:
re_tests = [(cls.RE_FILE_TYPE, file.magic_file_type),
(cls.RE_FILE_EXTENSION, file.name)]
- re_tests = filter(lambda pair: pair[0], re_tests)
+ re_tests = list(filter(lambda pair: pair[0], re_tests))
if re_tests: # if neither are defined, it's *not* a match
flag = all(bool(pair[0].search(pair[1])) for pair in re_tests)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list