Skip to content

Commit 5ddab29

Browse files
author
Richard Jones
committed
added is_retired query to Class
1 parent 72694fd commit 5ddab29

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

roundup/backends/back_anydbm.py

Lines changed: 15 additions & 1 deletion
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_anydbm.py,v 1.58 2002-08-01 15:06:24 gmcm Exp $
18+
#$Id: back_anydbm.py,v 1.59 2002-08-16 04:28:13 richard Exp $
1919
'''
2020
This module defines a backend that saves the hyperdatabase in a database
2121
chosen by anydbm. It is guaranteed to always be available in python
@@ -1162,6 +1162,14 @@ def retire(self, nodeid):
11621162

11631163
self.fireReactors('retire', nodeid, None)
11641164

1165+
def is_retired(self, nodeid):
1166+
'''Return true if the node is retired.
1167+
'''
1168+
node = self.db.getnode(cn, nodeid, cldb)
1169+
if node.has_key(self.db.RETIRED_FLAG):
1170+
return 1
1171+
return 0
1172+
11651173
def destroy(self, nodeid):
11661174
"""Destroy a node.
11671175
@@ -1795,6 +1803,12 @@ def __init__(self, db, classname, **properties):
17951803

17961804
#
17971805
#$Log: not supported by cvs2svn $
1806+
#Revision 1.58 2002/08/01 15:06:24 gmcm
1807+
#Use same regex to split search terms as used to index text.
1808+
#Fix to back_metakit for not changing journaltag on reopen.
1809+
#Fix htmltemplate's do_link so [No <whatever>] strings are href'd.
1810+
#Fix bogus "nosy edited ok" msg - the **d syntax does NOT share d between caller and callee.
1811+
#
17981812
#Revision 1.57 2002/07/31 23:57:36 richard
17991813
# . web forms may now unset Link values (like assignedto)
18001814
#

roundup/hyperdb.py

Lines changed: 9 additions & 1 deletion
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: hyperdb.py,v 1.79 2002-07-29 23:30:14 richard Exp $
18+
# $Id: hyperdb.py,v 1.80 2002-08-16 04:28:13 richard Exp $
1919

2020
__doc__ = """
2121
Hyperdatabase implementation, especially field types.
@@ -416,6 +416,11 @@ def retire(self, nodeid):
416416
"""
417417
raise NotImplementedError
418418

419+
def is_retired(self, nodeid):
420+
'''Return true if the node is rerired
421+
'''
422+
raise NotImplementedError
423+
419424
def destroy(self, nodeid):
420425
"""Destroy a node.
421426
@@ -604,6 +609,9 @@ def Choice(name, db, *options):
604609

605610
#
606611
# $Log: not supported by cvs2svn $
612+
# Revision 1.79 2002/07/29 23:30:14 richard
613+
# documentation reorg post-new-security
614+
#
607615
# Revision 1.78 2002/07/21 03:26:37 richard
608616
# Gordon, does this help?
609617
#

0 commit comments

Comments
 (0)