Skip to content

Commit 587428a

Browse files
author
Richard Jones
committed
hardening for stringFind with missing props
1 parent 01cef2a commit 587428a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

roundup/backends/back_anydbm.py

Lines changed: 3 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.89 2002-10-08 04:11:14 richard Exp $
18+
#$Id: back_anydbm.py,v 1.90 2002-10-31 04:03:48 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
@@ -1506,6 +1506,8 @@ def stringFind(self, **requirements):
15061506
if node.has_key(self.db.RETIRED_FLAG):
15071507
continue
15081508
for key, value in requirements.items():
1509+
if not node.has_key(key):
1510+
break
15091511
if node[key] is None or node[key].lower() != value:
15101512
break
15111513
else:

0 commit comments

Comments
 (0)