##// 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 self.file = open(self.journal, "w")
31 self.file = open(self.journal, "w")
32
32
33 def __del__(self):
33 def __del__(self):
34 if self.entries: self.abort()
34 if self.journal:
35 try: os.unlink(self.journal)
35 if self.entries: self.abort()
36 except: pass
36 self.file.close()
37 try: os.unlink(self.journal)
38 except: pass
37
39
38 def add(self, file, offset):
40 def add(self, file, offset):
39 if file in self.map: return
41 if file in self.map: return
General Comments 0
You need to be logged in to leave comments. Login now