~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-18 10:55:12 UTC
  • mfrom: (5887.1.1 trivial_close_earlier)
  • Revision ID: pqm@pqm.ubuntu.com-20110518105512-8rhaqw4g6a8pnjuo
(jameinel) Close file objects a bit earlier in _seek_and_read. Helps PyPy's
 lazy collector. (Martin [gz])

Show diffs side-by-side

added added

removed removed

Lines of Context:
712
712
                    try:
713
713
                        cur_offset_and_size = offset_stack.next()
714
714
                    except StopIteration:
 
715
                        fp.close()
715
716
                        cur_offset_and_size = None
716
717
                    yield this_offset, this_data
717
 
        except:
 
718
        finally:
718
719
            fp.close()
719
 
            raise
720
 
        fp.close()
721
720
 
722
721
    def _sort_expand_and_combine(self, offsets, upper_limit):
723
722
        """Helper for readv.