Show More
@@ -22,7 +22,9 b' class transaction:' | |||
|
22 | 22 | |
|
23 | 23 | # abort here if the journal already exists |
|
24 | 24 | if os.path.exists(self.journal): |
|
25 |
|
|
|
25 | print "journal already exists, recovering" | |
|
26 | self.recover() | |
|
27 | ||
|
26 | 28 | self.file = open(self.journal, "w") |
|
27 | 29 | |
|
28 | 30 | def __del__(self): |
@@ -59,4 +61,5 b' class transaction:' | |||
|
59 | 61 | for l in open(self.journal).readlines(): |
|
60 | 62 | f, o = l.split('\0') |
|
61 | 63 | self.opener(f, "a").truncate(int(o)) |
|
64 | os.unlink(self.journal) | |
|
62 | 65 |
General Comments 0
You need to be logged in to leave comments.
Login now