~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/response.py

  • Committer: Patch Queue Manager
  • Date: 2013-08-10 15:09:30 UTC
  • mfrom: (6586.1.1 various)
  • Revision ID: pqm@pqm.ubuntu.com-20130810150930-5heu5saz1ovys4wo
(vila) Docstrings cleanup. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
289
289
                    % (size, self._start, self._size))
290
290
 
291
291
        # read data from file
292
 
        buffer = StringIO()
 
292
        buf = StringIO()
293
293
        limited = size
294
294
        if self._size > 0:
295
295
            # Don't read past the range definition
296
296
            limited = self._start + self._size - self._pos
297
297
            if size >= 0:
298
298
                limited = min(limited, size)
299
 
        osutils.pumpfile(self._file, buffer, limited, self._max_read_size)
300
 
        data = buffer.getvalue()
 
299
        osutils.pumpfile(self._file, buf, limited, self._max_read_size)
 
300
        data = buf.getvalue()
301
301
 
302
302
        # Update _pos respecting the data effectively read
303
303
        self._pos += len(data)