Skip to content

Commit 340665f

Browse files
author
Richard Jones
committed
Rollback was breaking...
...because a message hadn't actually been written to the file. Needs more investigation.
1 parent 051ccd6 commit 340665f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

roundup/backends/back_anydbm.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
#$Id: back_anydbm.py,v 1.22 2002-01-14 02:20:15 richard Exp $
18+
#$Id: back_anydbm.py,v 1.23 2002-01-18 04:32:04 richard Exp $
1919
'''
2020
This module defines a backend that saves the hyperdatabase in a database
2121
chosen by anydbm. It is guaranteed to always be available in python
@@ -398,14 +398,24 @@ def rollback(self):
398398
for method, args in self.transactions:
399399
# delete temporary files
400400
if method == self._doStoreFile:
401-
os.remove(args[0]+".tmp")
401+
if os.path.exists(args[0]+".tmp"):
402+
os.remove(args[0]+".tmp")
402403
self.cache = {}
403404
self.dirtynodes = {}
404405
self.newnodes = {}
405406
self.transactions = []
406407

407408
#
408409
#$Log: not supported by cvs2svn $
410+
#Revision 1.22 2002/01/14 02:20:15 richard
411+
# . changed all config accesses so they access either the instance or the
412+
# config attriubute on the db. This means that all config is obtained from
413+
# instance_config instead of the mish-mash of classes. This will make
414+
# switching to a ConfigParser setup easier too, I hope.
415+
#
416+
#At a minimum, this makes migration a _little_ easier (a lot easier in the
417+
#0.5.0 switch, I hope!)
418+
#
409419
#Revision 1.21 2002/01/02 02:31:38 richard
410420
#Sorry for the huge checkin message - I was only intending to implement #496356
411421
#but I found a number of places where things had been broken by transactions:

0 commit comments

Comments
 (0)