projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '9417-asserttrue-for-value-comparison'
[arvados.git]
/
sdk
/
python
/
arvados
/
arvfile.py
diff --git
a/sdk/python/arvados/arvfile.py
b/sdk/python/arvados/arvfile.py
index 0326608a0bb6e3270341f1ad1b01a3e7926958ac..b78c63e301b81d5ddb2644983e2e83017e98bbdf 100644
(file)
--- a/
sdk/python/arvados/arvfile.py
+++ b/
sdk/python/arvados/arvfile.py
@@
-108,6
+108,7
@@
class ArvadosFileReaderBase(_FileLikeObjectBase):
cache_pos, cache_data = self._readline_cache
if self.tell() == cache_pos:
data = [cache_data]
cache_pos, cache_data = self._readline_cache
if self.tell() == cache_pos:
data = [cache_data]
+ self._filepos += len(cache_data)
else:
data = ['']
data_size = len(data[-1])
else:
data = ['']
data_size = len(data[-1])
@@
-123,6
+124,7
@@
class ArvadosFileReaderBase(_FileLikeObjectBase):
except ValueError:
nextline_index = len(data)
nextline_index = min(nextline_index, size)
except ValueError:
nextline_index = len(data)
nextline_index = min(nextline_index, size)
+ self._filepos -= len(data) - nextline_index
self._readline_cache = (self.tell(), data[nextline_index:])
return data[:nextline_index]
self._readline_cache = (self.tell(), data[nextline_index:])
return data[:nextline_index]
@@
-543,9
+545,6
@@
class _BlockManager(object):
def __exit__(self, exc_type, exc_value, traceback):
self.stop_threads()
def __exit__(self, exc_type, exc_value, traceback):
self.stop_threads()
- def __del__(self):
- self.stop_threads()
-
def commit_bufferblock(self, block, sync):
"""Initiate a background upload of a bufferblock.
def commit_bufferblock(self, block, sync):
"""Initiate a background upload of a bufferblock.