201
207
"Can't read %s bytes across range (%s, %s)"
202
208
% (size, self._start, self._size))
205
214
# Don't read past the range definition
206
215
limited = self._start + self._size - self._pos
208
217
limited = min(limited, size)
218
osutils.pumpfile(self._file, buffer, limited, self._max_read_size)
215
221
# Update _pos respecting the data effectively read