~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/index.py

  • Committer: Martin
  • Date: 2009-09-20 22:12:36 UTC
  • mto: This revision was merged to the branch mainline in revision 5257.
  • Revision ID: gzlist@googlemail.com-20090920221236-84nyjpop0ttgfwzj
Ensure all files opened by bazaar proper are explicitly closed

Show diffs side-by-side

added added

removed removed

Lines of Context:
441
441
        trailers = 0
442
442
        pos = stream.tell()
443
443
        lines = stream.read().split('\n')
 
444
        # GZ 2009-09-20: Should really use a try/finally block to ensure close
 
445
        stream.close()
444
446
        del lines[-1]
445
447
        _, _, _, trailers = self._parse_lines(lines, pos)
446
448
        for key, absent, references, value in self._keys_by_offset.itervalues():