~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/index.py

  • Committer: John Arbash Meinel
  • Date: 2009-12-02 17:59:15 UTC
  • mto: This revision was merged to the branch mainline in revision 4854.
  • Revision ID: john@arbash-meinel.com-20091202175915-me81n1ovkuml4ake
Explicitly call stream.close() in the index code.

This isn't in a finally block, but it is 'good enough'. At least .close is
being called rather than waiting for the garbage collector to run.

Show diffs side-by-side

added added

removed removed

Lines of Context:
455
455
        trailers = 0
456
456
        pos = stream.tell()
457
457
        lines = stream.read().split('\n')
 
458
        stream.close()
458
459
        del lines[-1]
459
460
        _, _, _, trailers = self._parse_lines(lines, pos)
460
461
        for key, absent, references, value in self._keys_by_offset.itervalues():