[ARVADOS] updated: cd5dd98b4b660085586693cdc2cf350fcc06a074

git at public.curoverse.com git at public.curoverse.com
Tue Jul 1 10:17:41 EDT 2014


Summary of changes:
 services/fuse/bin/arv-mount | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

       via  cd5dd98b4b660085586693cdc2cf350fcc06a074 (commit)
      from  71035a6ed21e5acf4604b04bd7e046734efd650b (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 cd5dd98b4b660085586693cdc2cf350fcc06a074
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue Jul 1 10:17:34 2014 -0400

    Always initialize arvados.api() so it doesn't silently fail when
    ARVADOS_API_HOST isn't set.  Improve error handing in arv-mount.  no issue #

diff --git a/services/fuse/bin/arv-mount b/services/fuse/bin/arv-mount
index 726741e..b874f5f 100755
--- a/services/fuse/bin/arv-mount
+++ b/services/fuse/bin/arv-mount
@@ -43,18 +43,22 @@ collections on the server.""")
     if args.debug:
         arvados.config.settings()['ARVADOS_DEBUG'] = 'true'
 
-    if args.groups:
+    try:
         api = arvados.api('v1')
-        e = operations.inodes.add_entry(GroupsDirectory(llfuse.ROOT_INODE, operations.inodes, api))
-    elif args.tags:
-        api = arvados.api('v1')
-        e = operations.inodes.add_entry(TagsDirectory(llfuse.ROOT_INODE, operations.inodes, api))
-    elif args.collection != None:
-        # Set up the request handler with the collection at the root
-        e = operations.inodes.add_entry(CollectionDirectory(llfuse.ROOT_INODE, operations.inodes, args.collection))
-    else:
-        # Set up the request handler with the 'magic directory' at the root
-        operations.inodes.add_entry(MagicDirectory(llfuse.ROOT_INODE, operations.inodes))
+
+        if args.groups:
+            e = operations.inodes.add_entry(GroupsDirectory(llfuse.ROOT_INODE, operations.inodes, api))
+        elif args.tags:
+            e = operations.inodes.add_entry(TagsDirectory(llfuse.ROOT_INODE, operations.inodes, api))
+        elif args.collection != None:
+            # Set up the request handler with the collection at the root
+            e = operations.inodes.add_entry(CollectionDirectory(llfuse.ROOT_INODE, operations.inodes, args.collection))
+        else:
+            # Set up the request handler with the 'magic directory' at the root
+            operations.inodes.add_entry(MagicDirectory(llfuse.ROOT_INODE, operations.inodes))
+    except Exception as ex:
+        print("arv-mount: %s" % ex)
+        exit(1)
 
     # FUSE options, see mount.fuse(8)
     opts = [optname for optname in ['allow_other', 'debug']

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list