changeset 558 | 0ceea19182a9 |
parent 515 | 03f27b1381f9 |
child 573 | fbfbd4e506c3 |
--- a/mercurial/transaction.py Fri Jul 01 08:54:52 2005 -0800 +++ b/mercurial/transaction.py Fri Jul 01 09:01:07 2005 -0800 @@ -31,9 +31,11 @@ self.file = open(self.journal, "w") def __del__(self): - if self.entries: self.abort() - try: os.unlink(self.journal) - except: pass + if self.journal: + if self.entries: self.abort() + self.file.close() + try: os.unlink(self.journal) + except: pass def add(self, file, offset): if file in self.map: return