foreach just refers to other parameter to use as iterator variable.
authorPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 29 Jul 2014 20:32:50 +0000 (16:32 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 29 Jul 2014 20:32:50 +0000 (16:32 -0400)
crunch_scripts/run-command

index a7dcd25dfcc8bf66677bc8ee4ae0019b85efa3f8..186b1bce3867951c49784ab4e44a6d225552517e 100755 (executable)
@@ -70,9 +70,8 @@ class SigHandler(object):
 
 if "foreach" in jobp:
     if arvados.current_task()['sequence'] == 0:
-        var = jobp["foreach"]["var"]
-        values = jobp["foreach"]["values"]
-        fn = subst.do_substitution(jobp, values)
+        var = jobp["foreach"]
+        fn = subst.do_substitution(jobp, jobp[var])
         mode = os.stat(fn)
         prefix = fn[len(os.environ['TASK_KEEPMOUNT'])+1:]
         if mode != None: