[ARVADOS] updated: 8c9b3ded23d4594d2185056032e8f0bf22dd57e1

Git user git at public.curoverse.com
Thu May 11 17:25:43 EDT 2017


Summary of changes:
 sdk/python/arvados/collection.py     | 2 +-
 sdk/python/tests/test_collections.py | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

       via  8c9b3ded23d4594d2185056032e8f0bf22dd57e1 (commit)
       via  93e4548df0ba8e98589dea7cdde60a851a2d9c2f (commit)
      from  9cd1bd27bada41cd13fb9813144fe694a67c2d00 (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 8c9b3ded23d4594d2185056032e8f0bf22dd57e1
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu May 11 17:25:34 2017 -0400

    11681: Return native str type from Collection.portable_data_hash()  (previous commit was actually for CollectionWriter)

diff --git a/sdk/python/arvados/collection.py b/sdk/python/arvados/collection.py
index d4f2404..77312e4 100644
--- a/sdk/python/arvados/collection.py
+++ b/sdk/python/arvados/collection.py
@@ -1085,7 +1085,7 @@ class RichCollectionBase(CollectionBase):
             return self._portable_data_hash
         else:
             stripped = self.portable_manifest_text().encode()
-            return hashlib.md5(stripped).hexdigest() + '+' + str(len(stripped))
+            return '{}+{}'.format(hashlib.md5(stripped).hexdigest(), len(stripped))
 
     @synchronized
     def subscribe(self, callback):
diff --git a/sdk/python/tests/test_collections.py b/sdk/python/tests/test_collections.py
index b40ba57..a315044 100644
--- a/sdk/python/tests/test_collections.py
+++ b/sdk/python/tests/test_collections.py
@@ -1369,6 +1369,11 @@ class CollectionCreateUpdateTest(run_test_server.TestCaseWithServers):
             c1.manifest_text(),
             r"\. e65075d550f9b5bf9992fa1d71a131be\+3\S* 7ac66c0f148de9519b8bd264312c4d64\+7\S* 0:3:count\.txt 3:7:count\.txt~\d\d\d\d\d\d\d\d-\d\d\d\d\d\d~conflict~$")
 
+    def test_pdh_is_native_str(self):
+        c1 = self.create_count_txt()
+        pdh = c1.portable_data_hash()
+        self.assertEqual(type(''), type(pdh))
+
 
 if __name__ == '__main__':
     unittest.main()

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list