From e142036a2369e33147f039334d2401ef9c004301 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 23 Aug 2002 05:00:38 +0000 Subject: [PATCH] fixed read-only gadfly retire() git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@992 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/backends/back_gadfly.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/roundup/backends/back_gadfly.py b/roundup/backends/back_gadfly.py index 5dc34db..ccf42dc 100644 --- a/roundup/backends/back_gadfly.py +++ b/roundup/backends/back_gadfly.py @@ -1,4 +1,4 @@ -# $Id: back_gadfly.py,v 1.3 2002-08-23 04:58:00 richard Exp $ +# $Id: back_gadfly.py,v 1.4 2002-08-23 05:00:38 richard Exp $ __doc__ = ''' About Gadfly ============ @@ -1270,6 +1270,9 @@ class Class(hyperdb.Class): Retired nodes are not returned by the find(), list(), or lookup() methods, and other nodes may reuse the values of their key properties. ''' + if self.db.journaltag is None: + raise DatabaseError, 'Database open read-only' + cursor = self.db.conn.cursor() sql = 'update _%s set __retired__=1 where id=?'%self.classname if __debug__: @@ -1645,6 +1648,9 @@ class IssueClass(Class, roundupdb.IssueClass): # # $Log: not supported by cvs2svn $ +# Revision 1.3 2002/08/23 04:58:00 richard +# ahhh, I understand now +# # Revision 1.2 2002/08/23 04:48:10 richard # That's gadfly done, mostly. Things left: # - Class.filter (I'm a wuss ;) -- 2.30.2