]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Revert "Do not spawn a parallel task if dictionary entry does not exist."
authorSage Weil <sage@inktank.com>
Fri, 7 Mar 2014 00:56:14 +0000 (16:56 -0800)
committerSage Weil <sage@inktank.com>
Fri, 7 Mar 2014 00:56:14 +0000 (16:56 -0800)
This reverts commit dadc9f7d0b6d9c13ccbc4edeb9f7875fc0ae0cac.

teuthology/task/parallel.py

index 35e45732d66e0f5411d4af16e6229d6a6bd52e05..4cfb67879e90fc4942b1010009084159ebe9b813 100644 (file)
@@ -37,9 +37,10 @@ def task(ctx, config):
     log.info('starting parallel...')
     with parallel.parallel() as p:
         for entry in config:
-            if isinstance(entry, dict):
-                ((taskname, confg),) = entry.iteritems()
-                p.spawn(_run_spawned, ctx, confg, taskname)
+            if not isinstance(entry, dict):
+                entry = ctx.config.get(entry, {})
+            ((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)"""