From: richard Date: Fri, 18 Jan 2002 04:32:04 +0000 (+0000) Subject: Rollback was breaking because a message hadn't actually been written to the file... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=21011119d3f1570e34e66618fc9e4158d39f02f8;p=roundup.git Rollback was breaking because a message hadn't actually been written to the file. Needs more investigation. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@565 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/backends/back_anydbm.py b/roundup/backends/back_anydbm.py index 61877a4..6b5bb2e 100644 --- a/roundup/backends/back_anydbm.py +++ b/roundup/backends/back_anydbm.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -#$Id: back_anydbm.py,v 1.22 2002-01-14 02:20:15 richard Exp $ +#$Id: back_anydbm.py,v 1.23 2002-01-18 04:32:04 richard Exp $ ''' This module defines a backend that saves the hyperdatabase in a database chosen by anydbm. It is guaranteed to always be available in python @@ -398,7 +398,8 @@ class Database(hyperdb.Database): for method, args in self.transactions: # delete temporary files if method == self._doStoreFile: - os.remove(args[0]+".tmp") + if os.path.exists(args[0]+".tmp"): + os.remove(args[0]+".tmp") self.cache = {} self.dirtynodes = {} self.newnodes = {} @@ -406,6 +407,15 @@ class Database(hyperdb.Database): # #$Log: not supported by cvs2svn $ +#Revision 1.22 2002/01/14 02:20:15 richard +# . changed all config accesses so they access either the instance or the +# config attriubute on the db. This means that all config is obtained from +# instance_config instead of the mish-mash of classes. This will make +# switching to a ConfigParser setup easier too, I hope. +# +#At a minimum, this makes migration a _little_ easier (a lot easier in the +#0.5.0 switch, I hope!) +# #Revision 1.21 2002/01/02 02:31:38 richard #Sorry for the huge checkin message - I was only intending to implement #496356 #but I found a number of places where things had been broken by transactions: