11684: Reverted easy fix to expose the bug: when there's a delay writing a block...
[arvados.git] / sdk / python / arvados / collection.py
index 1f5067360d0589351733ac44c1ae4462d3de867c..77312e4d4917a276f00b46e90e13ab13ba0d5ac4 100644 (file)
@@ -360,7 +360,7 @@ class CollectionWriter(CollectionBase):
 
     def portable_data_hash(self):
         stripped = self.stripped_manifest().encode()
-        return hashlib.md5(stripped).hexdigest() + '+' + str(len(stripped))
+        return '{}+{}'.format(hashlib.md5(stripped).hexdigest(), len(stripped))
 
     def manifest_text(self):
         self.finish_current_stream()
@@ -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):