[ARVADOS] updated: 331db3ab818292057af3c39e18bd76d654d9fab5

Git user git at public.curoverse.com
Tue Aug 16 12:01:29 EDT 2016


Summary of changes:
 sdk/cwl/arvados_cwl/fsaccess.py | 5 +++++
 1 file changed, 5 insertions(+)

       via  331db3ab818292057af3c39e18bd76d654d9fab5 (commit)
      from  419013258ddead1ece05327e96017222f4aa7de8 (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 331db3ab818292057af3c39e18bd76d654d9fab5
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue Aug 16 12:01:23 2016 -0400

    9783: Report useful error if subdirectory of a collection doesn't exist or isn't a
    directory.

diff --git a/sdk/cwl/arvados_cwl/fsaccess.py b/sdk/cwl/arvados_cwl/fsaccess.py
index 0970e72..ae4532b 100644
--- a/sdk/cwl/arvados_cwl/fsaccess.py
+++ b/sdk/cwl/arvados_cwl/fsaccess.py
@@ -1,5 +1,6 @@
 import fnmatch
 import os
+import errno
 
 import cwltool.stdfsaccess
 from cwltool.pathmapper import abspath
@@ -96,6 +97,10 @@ class CollectionFsAccess(cwltool.stdfsaccess.StdFsAccess):
                 dir = collection.find(rest)
             else:
                 dir = collection
+            if dir is None:
+                raise IOError(errno.ENOENT, "Directory '%s' in '%s' not found" % (rest, collection.portable_data_hash()))
+            if not isinstance(dir, arvados.collection.Collection):
+                raise IOError(errno.ENOENT, "Path '%s' in '%s' is not a Directory" % (rest, collection.portable_data_hash()))
             return [abspath(l, fn) for l in dir.keys()]
         else:
             return super(CollectionFsAccess, self).listdir(fn)

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list