From dadc9f7d0b6d9c13ccbc4edeb9f7875fc0ae0cac Mon Sep 17 00:00:00 2001 From: Warren Usui Date: Thu, 20 Feb 2014 20:18:28 -0800 Subject: [PATCH] Do not spawn a parallel task if dictionary entry does not exist. Fixes: 7397 Signed-off-by: Warren Usui --- teuthology/task/parallel.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/teuthology/task/parallel.py b/teuthology/task/parallel.py index 4cfb67879e90f..35e45732d66e0 100644 --- a/teuthology/task/parallel.py +++ b/teuthology/task/parallel.py @@ -37,10 +37,9 @@ def task(ctx, config): log.info('starting parallel...') with parallel.parallel() as p: for entry in config: - if not isinstance(entry, dict): - entry = ctx.config.get(entry, {}) - ((taskname, confg),) = entry.iteritems() - p.spawn(_run_spawned, ctx, confg, taskname) + if isinstance(entry, dict): + ((taskname, confg),) = entry.iteritems() + p.spawn(_run_spawned, ctx, confg, taskname) def _run_spawned(ctx,config,taskname): """Run one of the tasks (this runs in parallel with others)""" -- 2.39.5