Skip to content

Commit c4f8ddd

Browse files
author
Richard Jones
committed
bsddb3 backend should use 'c' for create, not 'n' for nuke
1 parent f83cb67 commit c4f8ddd

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

CHANGES.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
This file contains the changes to the Roundup system over time. The entries
22
are given with the most recent entry first.
33

4-
2002-??-?? 0.?.?
4+
2002-??-?? 0.4.3
55
Fixed:
66
. #576086 ] dumb copying mistake (frontends/ZRoundup.py)
77
. installation instructions now mention "python2" in "testing your python".
8+
. bsddb3 backend should use 'c' for create, not 'n' for nuke
89

910

1011
2002-06-24 0.4.2

roundup/backends/back_bsddb3.py

Lines changed: 10 additions & 4 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_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

2020
import bsddb3, os, marshal
2121
from 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

Comments
 (0)