226
201
"Can't read %s bytes across range (%s, %s)"
227
202
% (size, self._start, self._size))
233
205
# Don't read past the range definition
234
206
limited = self._start + self._size - self._pos
236
208
limited = min(limited, size)
237
osutils.pumpfile(self._file, buffer, limited, self._max_read_size)
240
215
# Update _pos respecting the data effectively read