~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/sftp.py

  • Committer: John Arbash Meinel
  • Date: 2011-05-11 11:35:28 UTC
  • mto: This revision was merged to the branch mainline in revision 5851.
  • Revision ID: john@arbash-meinel.com-20110511113528-qepibuwxicjrbb2h
Break compatibility with python <2.6.

This includes auditing the code for places where we were doing
explicit 'sys.version' checks and removing them as appropriate.

Show diffs side-by-side

added added

removed removed

Lines of Context:
281
281
                    buffered = buffered[buffered_offset:]
282
282
                    buffered_data = [buffered]
283
283
                    buffered_len = len(buffered)
 
284
        # now that the data stream is done, close the handle
 
285
        fp.close()
284
286
        if buffered_len:
285
287
            buffered = ''.join(buffered_data)
286
288
            del buffered_data[:]
421
423
        :param relpath: The relative path to the file
422
424
        """
423
425
        try:
424
 
            # FIXME: by returning the file directly, we don't pass this
425
 
            # through to report_activity.  We could try wrapping the object
426
 
            # before it's returned.  For readv and get_bytes it's handled in
427
 
            # the higher-level function.
428
 
            # -- mbp 20090126
429
426
            path = self._remote_path(relpath)
430
427
            f = self._get_sftp().file(path, mode='rb')
431
428
            if self._do_prefetch and (getattr(f, 'prefetch', None) is not None):