[ARVADOS] updated: bad2a6a760528915012d999466368d751c172463

git at public.curoverse.com git at public.curoverse.com
Thu Feb 20 10:28:32 EST 2014


Summary of changes:
 sdk/python/bin/arv-mount |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

       via  bad2a6a760528915012d999466368d751c172463 (commit)
      from  975c10c5b8ccc7d12ee4df993e06a359c4bbec93 (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 bad2a6a760528915012d999466368d751c172463
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu Feb 20 15:27:33 2014 +0000

    --exec works

diff --git a/sdk/python/bin/arv-mount b/sdk/python/bin/arv-mount
index 613db12..0cab824 100755
--- a/sdk/python/bin/arv-mount
+++ b/sdk/python/bin/arv-mount
@@ -13,7 +13,7 @@ if __name__ == '__main__':
     parser.add_argument('mountpoint', type=str, help="""Mount point.""")
     parser.add_argument('--collection', type=str, help="""Collection locator""")
     parser.add_argument('--debug', action='store_true', help="""Debug mode""")
-    parser.add_argument('--exec', type=str, help="""Mount, run a command, then unmount and exit""")
+    parser.add_argument('--exec', type=str, help="""Mount, run a command, then unmount and exit""", dest="ex")
 
     args = parser.parse_args()
 
@@ -38,17 +38,20 @@ if __name__ == '__main__':
     # Initialize the fuse connection
     llfuse.init(operations, args.mountpoint, opts)
 
-    if args.exec:
+    if args.ex:
         t = threading.Thread(None, lambda: llfuse.main())
         t.start()
 
         # wait until the driver is finished initializing
         operations.initlock.wait()
 
-        rc = subprocess.call(args.exec)
+        try:
+            rc = subprocess.call(args.ex, shell=True)
+        except:
+            rc = 255
+        finally:
+            subprocess.call(["fusermount", "-u", args.mountpoint])
 
-        subprocess.call(["fusermount", "-u", args.mountpoint])
-
-        return rc
+        exit(rc)
     else:
         llfuse.main()

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list