Skip to content

Commit 472a429

Browse files
committed
Fix issue2550505.
1 parent fc8f6b5 commit 472a429

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

roundup/backends/back_anydbm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,7 +1561,7 @@ def _filter(self, search_matches, filterspec, proptree,
15611561
"sort" and "group" are (dir, prop) where dir is '+', '-' or None
15621562
and prop is a prop name or None
15631563
1564-
"search_matches" is {nodeid: marker} or None
1564+
"search_matches" is a sequence type or None
15651565
15661566
The filter must match all properties specificed. If the property
15671567
value to match is a list:
@@ -1721,7 +1721,7 @@ def _filter(self, search_matches, filterspec, proptree,
17211721
if search_matches is not None:
17221722
k = []
17231723
for v in matches:
1724-
if search_matches.has_key(v[0]):
1724+
if v[0] in search_matches:
17251725
k.append(v)
17261726
matches = k
17271727

roundup/backends/rdbms_common.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2114,7 +2114,7 @@ def filter(self, search_matches, filterspec, sort=[], group=[]):
21142114
backward-compatibility reasons a single (dir, prop) tuple is
21152115
also allowed.
21162116
2117-
"search_matches" is {nodeid: marker} or None
2117+
"search_matches" is a sequence type or None
21182118
21192119
The filter must match all properties specificed. If the property
21202120
value to match is a list:
@@ -2123,7 +2123,7 @@ def filter(self, search_matches, filterspec, sort=[], group=[]):
21232123
2. Other properties must match any of the elements in the list.
21242124
"""
21252125
# we can't match anything if search_matches is empty
2126-
if search_matches == {}:
2126+
if not search_matches and search_matches is not None:
21272127
return []
21282128

21292129
if __debug__:
@@ -2334,8 +2334,7 @@ def filter(self, search_matches, filterspec, sort=[], group=[]):
23342334

23352335
# add results of full text search
23362336
if search_matches is not None:
2337-
v = search_matches.keys()
2338-
s = ','.join([a for x in v])
2337+
s = ','.join([a for x in search_matches])
23392338
where.append('_%s.id in (%s)'%(icn, s))
23402339
args = args + v
23412340

roundup/hyperdb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ def storefile(self, classname, nodeid, property, content):
707707
raise NotImplementedError
708708

709709
def getfile(self, classname, nodeid, property):
710-
'''Store the content of the file in the database.
710+
'''Get the content of the file in the database.
711711
'''
712712
raise NotImplementedError
713713

@@ -1129,7 +1129,7 @@ def filter(self, search_matches, filterspec, sort=[], group=[]):
11291129
backward-compatibility reasons a single (dir, prop) tuple is
11301130
also allowed.
11311131
1132-
"search_matches" is {nodeid: marker}
1132+
"search_matches" is a sequence type
11331133
11341134
The filter must match all properties specificed. If the property
11351135
value to match is a list:

0 commit comments

Comments
 (0)