##// END OF EJS Templates
transaction: __del__ should do nothing if the journal already exists...
mpm@selenic.com -
r558:0ceea191 default
parent child Browse files
Show More
@@ -31,9 +31,11 b' class transaction:'
31 31 self.file = open(self.journal, "w")
32 32
33 33 def __del__(self):
34 if self.entries: self.abort()
35 try: os.unlink(self.journal)
36 except: pass
34 if self.journal:
35 if self.entries: self.abort()
36 self.file.close()
37 try: os.unlink(self.journal)
38 except: pass
37 39
38 40 def add(self, file, offset):
39 41 if file in self.map: return
General Comments 0
You need to be logged in to leave comments. Login now