From f37214e114cf7cbf7aa85c89c40c289e8ca32f3a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 13 Jul 2012 13:57:22 -0700 Subject: [PATCH] kernel: fix kernel installation when kdb: is specified This normalize check would only trigger if a *single* key was specified. Change it so that it triggers as long as all keys are in the list of valid keys. This lets us specify both kdb: true and a sha1/branch/tag. Phew! --- teuthology/task/kernel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teuthology/task/kernel.py b/teuthology/task/kernel.py index ca4de6f87e405..051ce20c46240 100644 --- a/teuthology/task/kernel.py +++ b/teuthology/task/kernel.py @@ -40,8 +40,8 @@ def normalize_config(ctx, config): it is applied to all nodes. """ if config is None or \ - len(config) == 1 and config.keys() in [['tag'], ['branch'], - ['sha1'], ['kdb']]: + len(filter(lambda x: x in ['tag', 'branch', 'sha1', 'kdb'], + config.keys())) == len(config.keys()): new_config = {} if config is None: config = {'branch': 'master'} -- 2.39.5