[ARVADOS] updated: 52e32bbee4cb43cc42aca47c927643f7662da266
git at public.curoverse.com
git at public.curoverse.com
Mon Jun 1 08:51:36 EDT 2015
Summary of changes:
sdk/python/arvados/arvfile.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
via 52e32bbee4cb43cc42aca47c927643f7662da266 (commit)
from 299c01cb4d4a96a94ece77db417ceb7af8e9ba69 (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 52e32bbee4cb43cc42aca47c927643f7662da266
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Mon Jun 1 08:51:35 2015 -0400
6194: Fix typo in invocation of writeto() and use memoryview to avoid copying slices.
diff --git a/sdk/python/arvados/arvfile.py b/sdk/python/arvados/arvfile.py
index 2d38866..46c4961 100644
--- a/sdk/python/arvados/arvfile.py
+++ b/sdk/python/arvados/arvfile.py
@@ -787,11 +787,12 @@ class ArvadosFile(object):
if len(data) > config.KEEP_BLOCK_SIZE:
# Chunk it up into smaller writes
n = 0
+ dataview = memoryview(data)
while (n + config.KEEP_BLOCK_SIZE) < len(data):
- self.writeto(self, offset+n, data[n:n + config.KEEP_BLOCK_SIZE], num_retries)
+ self.writeto(offset+n, dataview[n:n + config.KEEP_BLOCK_SIZE].tobytes(), num_retries)
n += config.KEEP_BLOCK_SIZE
if n < len(data):
- self.writeto(self, offset+n, data[n:], num_retries)
+ self.writeto(offset+n, dataview[n:].tobytes(), num_retries)
return
self._modified = True
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list