From 1d13f6a6edd0f101d11edc55663d83ac40f6fbfe Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Wed, 30 Jul 2014 11:30:47 -0400 Subject: [PATCH] Fix syntax error --- crunch_scripts/run-command | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crunch_scripts/run-command b/crunch_scripts/run-command index 27ce8227ee..826cbb556c 100755 --- a/crunch_scripts/run-command +++ b/crunch_scripts/run-command @@ -99,7 +99,7 @@ def get_items(p, value): if mode != None: if stat.S_ISDIR(mode): items = ["$(dir %s/%s)" % (prefix, l) for l in os.listdir(fn)] - else stat.S_ISREG(mode): + elif stat.S_ISREG(mode): with open(fn) as f: items = [line for line in f] return items @@ -108,7 +108,7 @@ def get_items(p, value): if "task.foreach" in jobp: if arvados.current_task()['sequence'] == 0: - var = jobp["foreach"] + var = jobp["task.foreach"] items = get_items(jobp, jobp[var]) if items != None: print("run-command: parallelizing on %s with items %s" % (var, items)) @@ -134,8 +134,8 @@ try: stdoutname = None stdoutfile = None - if "stdout" in p: - stdoutname = subst.do_substitution(p, p["stdout"]) + if "save.stdout" in p: + stdoutname = subst.do_substitution(p, p["save.stdout"]) stdoutfile = open(stdoutname, "wb") print("run-command: {}{}".format(' '.join(cmd), (" > " + stdoutname) if stdoutname != None else "")) -- 2.39.5