Mercurial > p > roundup > code
diff roundup/backends/back_anydbm.py @ 4347:0e33bf5571dc
make some more memorydb tests pass
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 05 Feb 2010 05:10:52 +0000 |
| parents | 94c992852f12 |
| children | 1f89953f8c8a |
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py Fri Feb 05 04:10:06 2010 +0000 +++ b/roundup/backends/back_anydbm.py Fri Feb 05 05:10:52 2010 +0000 @@ -784,6 +784,8 @@ These operations trigger detectors and can be vetoed. Attempts to modify the "creation" or "activity" properties cause a KeyError. """ + if self.db.journaltag is None: + raise hyperdb.DatabaseError, _('Database open read-only') self.fireAuditors('create', None, propvalues) newid = self.create_inner(**propvalues) self.fireReactors('create', newid, None) @@ -1045,6 +1047,9 @@ These operations trigger detectors and can be vetoed. Attempts to modify the "creation" or "activity" properties cause a KeyError. """ + if self.db.journaltag is None: + raise hyperdb.DatabaseError, _('Database open read-only') + self.fireAuditors('set', nodeid, propvalues) oldvalues = copy.deepcopy(self.db.getnode(self.classname, nodeid)) for name,prop in self.getprops(protected=0).items(): @@ -1390,6 +1395,7 @@ try: for nodeid in self.getnodeids(cldb): node = self.db.getnode(self.classname, nodeid, cldb) + print (nodeid, node, node[self.key], keyvalue) if node.has_key(self.db.RETIRED_FLAG): continue if not node.has_key(self.key):
