~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2006-09-12 17:03:28 UTC
  • mto: (1910.19.18 smart-server-readv)
  • mto: This revision was merged to the branch mainline in revision 2017.
  • Revision ID: john@arbash-meinel.com-20060912170328-beee785b9e579ac2
Force all transports to raise ShortReadvError if they can

Show diffs side-by-side

added added

removed removed

Lines of Context:
254
254
            f.seek(start, (start < 0) and 2 or 0)
255
255
            start = f.tell()
256
256
            data = f.read(size)
257
 
            assert len(data) == size
 
257
            if len(data) != size:
 
258
                raise errors.ShortReadvError(relpath, start, size,
 
259
                            extra='Only read %s bytes' % (len(data),))
258
260
            yield start, data
259
261
 
260
262
    @staticmethod