[ARVADOS] updated: 2.1.0-1416-g13284d68b

Git user git at public.arvados.org
Wed Sep 29 02:06:33 UTC 2021


Summary of changes:
 sdk/python/arvados/collection.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

       via  13284d68be03f9d23cb59c94bc7dc72701fdec11 (commit)
      from  ea5a800b643143baade1eb6c7f1760d366d92674 (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 13284d68be03f9d23cb59c94bc7dc72701fdec11
Author: Tom Clegg <tom at curii.com>
Date:   Tue Sep 28 22:05:36 2021 -0400

    17779: Fix invalid manifest throwing IOError instead of SyntaxError.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/sdk/python/arvados/collection.py b/sdk/python/arvados/collection.py
index 1744cc7be..d03265ca4 100644
--- a/sdk/python/arvados/collection.py
+++ b/sdk/python/arvados/collection.py
@@ -1790,7 +1790,13 @@ class Collection(RichCollectionBase):
                             self.find_or_create(os.path.join(stream_name, name[:-2]), COLLECTION)
                     else:
                         filepath = os.path.join(stream_name, name)
-                        afile = self.find_or_create(filepath, FILE)
+                        try:
+                            afile = self.find_or_create(filepath, FILE)
+                        except IOError as e:
+                            if e.errno == errno.ENOTDIR:
+                                raise errors.SyntaxError("Dir part of %s conflicts with file of the same name.", filepath) from None
+                            else:
+                                raise e from None
                         if isinstance(afile, ArvadosFile):
                             afile.add_segment(blocks, pos, size)
                         else:

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list