[ARVADOS] updated: 02d6330526fbd94f4a1d711ee6ffc18a1553febf

git at public.curoverse.com git at public.curoverse.com
Wed Aug 13 14:49:44 EDT 2014


Summary of changes:
 crunch_scripts/run-command | 10 +++++-----
 crunch_scripts/vwd.py      |  5 +++--
 2 files changed, 8 insertions(+), 7 deletions(-)

       via  02d6330526fbd94f4a1d711ee6ffc18a1553febf (commit)
       via  43880152b12f257e7b1df225d355e7207a49dcc8 (commit)
      from  a437c40e832b7e2038d6c3de8771328ca84491c9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 02d6330526fbd94f4a1d711ee6ffc18a1553febf
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Aug 13 14:44:27 2014 -0400

    3505: Fixed typo comparison of list against 0 instead of len(list).

diff --git a/crunch_scripts/vwd.py b/crunch_scripts/vwd.py
index ad922bc..beb6b2f 100644
--- a/crunch_scripts/vwd.py
+++ b/crunch_scripts/vwd.py
@@ -20,8 +20,9 @@ def checkout(source_collection, target_dir, keepmount=None):
     if not os.path.exists(target_dir):
         os.makedirs(target_dir)
 
-    if os.listdir(target_dir) > 0:
-        raise Exception("target_dir must be empty before checkout")
+    l = os.listdir(target_dir)
+    if len(l) > 0:
+        raise Exception("target_dir must be empty before checkout, contains %s" % l)
 
     stem = os.path.join(keepmount, source_collection)
     for root, dirs, files in os.walk(os.path.join(keepmount, source_collection), topdown=True):

commit 43880152b12f257e7b1df225d355e7207a49dcc8
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Aug 13 14:25:44 2014 -0400

    3505: Adjust order of initialization to reflect potential side effects (e.g. file
    creation) on using functions such as $(glob) in the command.

diff --git a/crunch_scripts/run-command b/crunch_scripts/run-command
index 7599f5c..c85e74a 100755
--- a/crunch_scripts/run-command
+++ b/crunch_scripts/run-command
@@ -145,19 +145,19 @@ try:
     else:
         taskp = jobp
 
-    cmd = expand_list(taskp, taskp["command"])
-
     if "task.vwd" in taskp:
         # Populate output directory with symlinks to files in collection
         vwd.checkout(subst.do_substitution(taskp, taskp["task.vwd"]), outdir)
 
+    if "task.cwd" in taskp:
+        os.chdir(subst.do_substitution(taskp, taskp["task.cwd"]))
+
+    cmd = expand_list(taskp, taskp["command"])
+
     if "save.stdout" in taskp:
         stdoutname = subst.do_substitution(taskp, taskp["save.stdout"])
         stdoutfile = open(stdoutname, "wb")
 
-    if "task.cwd" in taskp:
-        os.chdir(subst.do_substitution(taskp, taskp["task.cwd"]))
-
     logging.info("{}{}".format(' '.join(cmd), (" > " + stdoutname) if stdoutname != None else ""))
 
 except Exception as e:

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list