~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/sftp.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-12 16:42:48 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-20060912164248-e56b8c183b6ac6a6
Add some assert statements to make readv safe

Show diffs side-by-side

added added

removed removed

Lines of Context:
344
344
            cur_data_len += len(data)
345
345
 
346
346
            if cur_data_len < cur_coalesced.length:
 
347
                assert cur_data_len > 0
347
348
                continue
348
349
            assert cur_data_len == cur_coalesced.length, \
349
350
                "Somehow we read too much: %s != %s" % (cur_data_len,