From 9cfca4c53f748618d322e95fb68949942c0d8a5a Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 8 Jul 2002 06:41:03 +0000 Subject: [PATCH] Was reopening the database with 'n'. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@829 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/backends/back_bsddb3.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/roundup/backends/back_bsddb3.py b/roundup/backends/back_bsddb3.py index 821203b..287b2ab 100644 --- a/roundup/backends/back_bsddb3.py +++ b/roundup/backends/back_bsddb3.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -#$Id: back_bsddb3.py,v 1.12 2002-05-21 05:52:11 richard Exp $ +#$Id: back_bsddb3.py,v 1.13 2002-07-08 06:41:03 richard Exp $ import bsddb3, os, marshal from roundup import hyperdb, date @@ -46,7 +46,7 @@ class Database(back_anydbm.Database): if os.path.exists(path): return bsddb3.btopen(path, mode) else: - return bsddb3.btopen(path, 'n') + return bsddb3.btopen(path, 'c') def _opendb(self, name, mode): '''Low-level database opener that gets around anydbm/dbm @@ -58,8 +58,8 @@ class Database(back_anydbm.Database): path = os.path.join(os.getcwd(), self.dir, name) if not os.path.exists(path): if __debug__: - print >>hyperdb.DEBUG, "_opendb bsddb3.open(%r, 'n')"%path - return bsddb3.btopen(path, 'n') + print >>hyperdb.DEBUG, "_opendb bsddb3.open(%r, 'c')"%path + return bsddb3.btopen(path, 'c') # open the database with the correct module if __debug__: @@ -115,6 +115,12 @@ class Database(back_anydbm.Database): # #$Log: not supported by cvs2svn $ +#Revision 1.12 2002/05/21 05:52:11 richard +#Well whadya know, bsddb3 works again. +#The backend is implemented _exactly_ the same as bsddb - so there's no +#using its transaction or locking support. It'd be nice to use those some +#day I suppose. +# #Revision 1.11 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 -- 2.30.2