From 58cdab135640bd5a46f3a4f6598c06fa38ef0b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Fri, 12 Mar 2021 14:08:58 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D1=8F?= =?UTF-8?q?=20failed=5Fall=20=D0=B4=D0=BB=D1=8F=20=D0=BE=D0=BF=D1=80=D0=B5?= =?UTF-8?q?=D0=B4=D0=B5=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B7=D0=B0=D0=BF?= =?UTF-8?q?=D1=83=D1=81=D0=BA=D0=B0=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/core/server/func.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pym/core/server/func.py b/pym/core/server/func.py index f4d4874..2cd34a6 100644 --- a/pym/core/server/func.py +++ b/pym/core/server/func.py @@ -314,8 +314,11 @@ class Tasks(object): """ Выполнена хотя бы одна задача и все те, которые выполнены с ошибкой """ + def not_empty_all(l): + l = list(l) + return bool(l and all(l)) return cls( - lambda *args: any(not cls._result(*args)[x] for x in tasks if x in cls._result(*args))) + lambda *args: not_empty_all(not cls._result(*args)[x] for x in tasks if x in cls._result(*args))) @classmethod def failed_one_of(cls, *tasks):