[ARVADOS] updated: 1.3.0-1170-g3aad6008d

Git user git at public.curoverse.com
Wed Jul 3 16:26:41 UTC 2019


Summary of changes:
 services/fuse/arvados_fuse/__init__.py   |  2 +-
 services/fuse/arvados_fuse/command.py    |  2 +-
 services/fuse/tests/test_command_args.py | 16 +++++++++++++---
 3 files changed, 15 insertions(+), 5 deletions(-)

       via  3aad6008d82058864e680e34837519213a239293 (commit)
       via  ad085a257d057f604939b00a13eb72f99c52df17 (commit)
      from  60d72d50ddb51db1ec66ba5085256261b8423125 (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 3aad6008d82058864e680e34837519213a239293
Author: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
Date:   Tue Jul 2 12:11:05 2019 -0400

    14965: Fixes unlink operation encoding
    
    Arvados-DCO-1.1-Signed-off-by:  <ebiagiotti at veritasgenetics.com>

diff --git a/services/fuse/arvados_fuse/__init__.py b/services/fuse/arvados_fuse/__init__.py
index 93bcf0497..745889c75 100644
--- a/services/fuse/arvados_fuse/__init__.py
+++ b/services/fuse/arvados_fuse/__init__.py
@@ -814,7 +814,7 @@ class Operations(llfuse.Operations):
     def unlink(self, inode_parent, name, ctx=None):
         _logger.debug("arv-mount unlink: parent_inode %i '%s'", inode_parent, name)
         p = self._check_writable(inode_parent)
-        p.unlink(name)
+        p.unlink(name.decode())
 
     @rmdir_time.time()
     @catch_exceptions

commit ad085a257d057f604939b00a13eb72f99c52df17
Author: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
Date:   Tue Jul 2 11:59:26 2019 -0400

    14965: Fixes test for checking the arvmount version
    
    Arvados-DCO-1.1-Signed-off-by:  <ebiagiotti at veritasgenetics.com>

diff --git a/services/fuse/arvados_fuse/command.py b/services/fuse/arvados_fuse/command.py
index 76449729d..528336753 100644
--- a/services/fuse/arvados_fuse/command.py
+++ b/services/fuse/arvados_fuse/command.py
@@ -34,7 +34,7 @@ class ArgumentParser(argparse.ArgumentParser):
     with "--".
             """)
         self.add_argument('--version', action='version',
-                          version="%s %s" % (sys.argv[0], __version__),
+                          version=u"%s %s" % (sys.argv[0], __version__),
                           help='Print version and exit.')
         self.add_argument('mountpoint', type=str, help="""Mount point.""")
         self.add_argument('--allow-other', action='store_true',
diff --git a/services/fuse/tests/test_command_args.py b/services/fuse/tests/test_command_args.py
index bc18749f5..1962c0339 100644
--- a/services/fuse/tests/test_command_args.py
+++ b/services/fuse/tests/test_command_args.py
@@ -3,6 +3,7 @@
 # SPDX-License-Identifier: AGPL-3.0
 
 from __future__ import absolute_import
+from __future__ import print_function
 import arvados
 import arvados_fuse
 import arvados_fuse.command
@@ -185,11 +186,20 @@ class MountArgsTest(unittest.TestCase):
         self.assertEqual(True, self.mnt.listen_for_events)
 
     def test_version_argument(self):
-        orig, sys.stderr = sys.stderr, io.BytesIO()
+        # The argparse version action prints to stderr in Python 2 and stdout
+        # in Python 3.4 and up. Write both to the same stream so the test can pass 
+        # in both cases. 
+        origerr = sys.stderr
+        origout = sys.stdout
+        sys.stderr = io.StringIO()
+        sys.stdout = sys.stderr
+
         with self.assertRaises(SystemExit):
             args = arvados_fuse.command.ArgumentParser().parse_args(['--version'])
-        self.assertRegexpMatches(sys.stderr.getvalue(), "[0-9]+\.[0-9]+\.[0-9]+")
-        sys.stderr = orig
+        self.assertRegexpMatches(sys.stdout.getvalue(), "[0-9]+\.[0-9]+\.[0-9]+")
+        sys.stderr.close()
+        sys.stderr = origerr
+        sys.stdout = origout
 
     @noexit
     @mock.patch('arvados.events.subscribe')

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list