Skip to content

Commit c0d8946

Browse files
author
Richard Jones
committed
fixed lookup of "missing" Link values for new props in anydbm backend
1 parent 3d5541d commit c0d8946

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

CHANGES.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ Feature:
1010
- create a new RDBMS cursor after committing
1111
- added basic logging, and configuration of it and python's logging module
1212

13-
2004-06-10 0.7.5
13+
14+
2004-??-?? 0.7.5
1415
Fixed:
1516
- force lookup of journal props in anydbm filtering
17+
- fixed lookup of "missing" Link values for new props in anydbm backend
1618

1719

1820
2004-06-10 0.7.4

roundup/admin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
19-
# $Id: admin.py,v 1.71 2004-05-18 19:29:21 a1s Exp $
19+
# $Id: admin.py,v 1.72 2004-06-13 00:27:45 richard Exp $
2020

2121
'''Administration commands for maintaining Roundup trackers.
2222
'''
@@ -717,7 +717,7 @@ def do_display(self, args):
717717
keys.sort()
718718
for key in keys:
719719
value = cl.get(nodeid, key)
720-
print _('%(key)s: %(value)s')%locals()
720+
print _('%(key)s: %(value)r')%locals()
721721

722722
def do_create(self, args, pwre = re.compile(r'{(\w+)}(.+)')):
723723
""'''Usage: create classname property=value ...

roundup/backends/back_anydbm.py

Lines changed: 8 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_anydbm.py,v 1.153 2004-06-10 06:54:46 richard Exp $
18+
#$Id: back_anydbm.py,v 1.154 2004-06-13 00:27:45 richard Exp $
1919
'''This module defines a backend that saves the hyperdatabase in a
2020
database chosen by anydbm. It is guaranteed to always be available in python
2121
versions >2.1.1 (the dumbdbm fallback in 2.1.1 and earlier has several
@@ -1471,12 +1471,16 @@ def find(self, **propspec):
14711471
if item.has_key(self.db.RETIRED_FLAG):
14721472
continue
14731473
for propname, itemids in propspec:
1474-
# can't test if the item doesn't have this property
1475-
if not item.has_key(propname):
1476-
continue
14771474
if type(itemids) is not type({}):
14781475
itemids = {itemids:1}
14791476

1477+
# special case if the item doesn't have this property
1478+
if not item.has_key(propname):
1479+
if itemids.has_key(None):
1480+
l.append(id)
1481+
break
1482+
continue
1483+
14801484
# grab the property definition and its value on this item
14811485
prop = self.properties[propname]
14821486
value = item[propname]

0 commit comments

Comments
 (0)