From 86ba283acc3902123ee7431a981c5caf30598f20 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Tue, 25 Jun 2013 00:16:21 -0400 Subject: [PATCH] reader fixes --- sdk/python/arvados.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/python/arvados.py b/sdk/python/arvados.py index c242a5e24b..7593235c27 100644 --- a/sdk/python/arvados.py +++ b/sdk/python/arvados.py @@ -226,7 +226,7 @@ class StreamReader: else: self._current_datablock_pos += self.current_datablock_size() self._current_datablock_index += 1 - self._current_datablock = None + self._current_datablock_data = None def current_datablock_data(self): if self._current_datablock_data == None: self._current_datablock_data = Keep.get(self.data_locators[self._current_datablock_index]) @@ -259,7 +259,7 @@ class StreamReader: self.nextdatablock() if self._current_datablock_index >= len(self.data_locators): return None - data = self.current_datablock_data()[self._pos:self._pos+size] + data = self.current_datablock_data()[self._pos - self._current_datablock_pos : self._pos - self._current_datablock_pos + size] self._pos += len(data) return data -- 2.30.2