Skip to content

Commit dc9722b

Browse files
author
Richard Jones
committed
more handling of bad journals
1 parent e11dedb commit dc9722b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

roundup/backends/back_bsddb.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#$Id: back_bsddb.py,v 1.3 2001-07-23 08:20:44 richard Exp $
1+
#$Id: back_bsddb.py,v 1.4 2001-07-23 08:25:33 richard Exp $
22

33
import bsddb, os, marshal
44
from roundup import hyperdb, date
@@ -162,6 +162,8 @@ def getjournal(self, classname, nodeid):
162162
except bsddb.error, error:
163163
if error.args[0] != 2: raise
164164
return []
165+
# mor handling of bad journals
166+
if not db.has_key(nodeid): return []
165167
journal = marshal.loads(db[nodeid])
166168
res = []
167169
for entry in journal:
@@ -197,6 +199,11 @@ def rollback(self):
197199

198200
#
199201
#$Log: not supported by cvs2svn $
202+
#Revision 1.3 2001/07/23 08:20:44 richard
203+
#Moved over to using marshal in the bsddb and anydbm backends.
204+
#roundup-admin now has a "freshen" command that'll load/save all nodes (not
205+
# retired - mod hyperdb.Class.list() so it lists retired nodes)
206+
#
200207
#Revision 1.2 2001/07/23 07:56:05 richard
201208
#Storing only marshallable data in the db - no nasty pickled class references.
202209
#

0 commit comments

Comments
 (0)