From e118deb1ebb67b2bcbf2b1649795f0f012d194cf Mon Sep 17 00:00:00 2001 From: Bernardo Dal Seno <bdalseno@google.com> Date: Wed, 27 Mar 2013 11:22:49 +0100 Subject: [PATCH] QA: Fix assertion The assertion was always true because "all" was missing. Signed-off-by: Bernardo Dal Seno <bdalseno@google.com> Reviewed-by: Helga Velroyen <helgav@google.com> Reviewed-by: Michele Tartara <mtartara@google.com> --- qa/qa_cluster.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qa/qa_cluster.py b/qa/qa_cluster.py index 187ad2381..e608b8caf 100644 --- a/qa/qa_cluster.py +++ b/qa/qa_cluster.py @@ -479,7 +479,8 @@ def _GetClusterIPolicy(): # Sanity checks assert len(ret_specs) > 0 - good = ("min" in d and "std" in d and "max" in d for d in ret_specs) + good = all("min" in d and "std" in d and "max" in d + for d in ret_specs.values()) assert good, "Missing item in specs: %s" % ret_specs assert len(ret_policy) > 0 return (ret_policy, ret_specs) -- GitLab