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