]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Do not spawn a parallel task if dictionary entry does not exist. 204/head
authorWarren Usui <warren.usui@inktank.com>
Fri, 21 Feb 2014 04:18:28 +0000 (20:18 -0800)
committerWarren Usui <warren.usui@inktank.com>
Fri, 21 Feb 2014 04:18:28 +0000 (20:18 -0800)
Fixes: 7397
Signed-off-by: Warren Usui <warren.usui@inktank.com>
teuthology/task/parallel.py

index 4cfb67879e90fc4942b1010009084159ebe9b813..35e45732d66e0f5411d4af16e6229d6a6bd52e05 100644 (file)
@@ -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)"""