1515# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717#
18- #$Id: back_bsddb3.py,v 1.12 2002-05-21 05:52:11 richard Exp $
18+ #$Id: back_bsddb3.py,v 1.12.2.1 2002-07-08 06:51:02 richard Exp $
1919
2020import bsddb3 , os , marshal
2121from roundup import hyperdb , date
@@ -46,7 +46,7 @@ def getclassdb(self, classname, mode='r'):
4646 if os .path .exists (path ):
4747 return bsddb3 .btopen (path , mode )
4848 else :
49- return bsddb3 .btopen (path , 'n ' )
49+ return bsddb3 .btopen (path , 'c ' )
5050
5151 def _opendb (self , name , mode ):
5252 '''Low-level database opener that gets around anydbm/dbm
@@ -58,8 +58,8 @@ def _opendb(self, name, mode):
5858 path = os .path .join (os .getcwd (), self .dir , name )
5959 if not os .path .exists (path ):
6060 if __debug__ :
61- print >> hyperdb .DEBUG , "_opendb bsddb3.open(%r, 'n ')" % path
62- return bsddb3 .btopen (path , 'n ' )
61+ print >> hyperdb .DEBUG , "_opendb bsddb3.open(%r, 'c ')" % path
62+ return bsddb3 .btopen (path , 'c ' )
6363
6464 # open the database with the correct module
6565 if __debug__ :
@@ -115,6 +115,12 @@ def _doSaveJournal(self, classname, nodeid, action, params):
115115
116116#
117117#$Log: not supported by cvs2svn $
118+ #Revision 1.12 2002/05/21 05:52:11 richard
119+ #Well whadya know, bsddb3 works again.
120+ #The backend is implemented _exactly_ the same as bsddb - so there's no
121+ #using its transaction or locking support. It'd be nice to use those some
122+ #day I suppose.
123+ #
118124#Revision 1.11 2002/01/14 02:20:15 richard
119125# . changed all config accesses so they access either the instance or the
120126# config attriubute on the db. This means that all config is obtained from
0 commit comments