~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2013-08-09 15:09:23 UTC
  • mto: This revision was merged to the branch mainline in revision 6587.
  • Revision ID: v.ladeuil+lp@free.fr-20130809150923-y71dusyorep0hbkt
Fix various typos in docstrings. Rename 'buffer' to 'buf' since it's now a python builtin function.

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)