~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/pack.py

  • Committer: Martin Pool
  • Date: 2009-07-02 03:48:25 UTC
  • mto: This revision was merged to the branch mainline in revision 4502.
  • Revision ID: mbp@sourcefrog.net-20090702034825-2330z69r93a701ws
iter(i) returns i so we don't need a check

Show diffs side-by-side

added added

removed removed

Lines of Context:
175
175
 
176
176
        :param readv_result: the most recent readv result - list or generator
177
177
        """
178
 
        # we rely on its state as a generator to keep track of how much has
179
 
        # been used.
180
 
        if not getattr(readv_result, 'next'):
181
 
            readv_result = iter(readv_result)
 
178
        # readv can return a sequence or an iterator, but we require an
 
179
        # iterator to know how much has been consumed.
 
180
        readv_result = iter(readv_result)
182
181
        self.readv_result = readv_result
183
182
        self._string = None
184
183