From: Warren Usui Date: Fri, 21 Feb 2014 04:18:28 +0000 (-0800) Subject: Do not spawn a parallel task if dictionary entry does not exist. X-Git-Tag: 1.1.0~1647^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=dadc9f7d0b6d9c13ccbc4edeb9f7875fc0ae0cac;p=teuthology.git Do not spawn a parallel task if dictionary entry does not exist. Fixes: 7397 Signed-off-by: Warren Usui --- diff --git a/teuthology/task/parallel.py b/teuthology/task/parallel.py index 4cfb67879e..35e45732d6 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)"""