changeset 253:112ba3295f8f

core (utils): use generator when checking continue_tests in FilterBehavior: using a list was doing all the tests when the first one could fail, resulting in an exception in FileSharing.
author Goffi <goffi@goffi.org>
date Sat, 26 Jan 2019 20:24:48 +0100
parents fdda914a298b
children 0700293df0e6
files cagou/core/utils.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/cagou/core/utils.py	Sat Jan 26 20:24:48 2019 +0100
+++ b/cagou/core/utils.py	Sat Jan 26 20:24:48 2019 +0100
@@ -56,7 +56,7 @@
         filtering = len(text)>len(self._filter_last)
         self._filter_last = text
         for child in self.layout.children:
-            if continue_tests is not None and any([t(child) for t in continue_tests]):
+            if continue_tests is not None and any((t(child) for t in continue_tests)):
                 continue
             if text in get_child_text(child).lower():
                 self._filter_anim.cancel(child)