mirror of
https://github.com/python/cpython.git
synced 2025-11-01 14:11:41 +00:00
Fix test_bsddb3 (along with something bsddb) to work with dict views.
This commit is contained in:
parent
5b8d24a7f7
commit
0072e43d29
3 changed files with 13 additions and 3 deletions
|
@ -546,7 +546,7 @@ def __Select(self, table, columns, conditions):
|
|||
self.__load_column_info(table)
|
||||
if columns is None:
|
||||
columns = self.tablecolumns[table]
|
||||
for column in (columns + conditions.keys()):
|
||||
for column in (columns + list(conditions.keys())):
|
||||
if not self.__tablecolumns[table].count(column):
|
||||
raise TableDBError, "unknown column: %r" % (column,)
|
||||
|
||||
|
@ -580,7 +580,7 @@ def cmp_conditions(atuple, btuple):
|
|||
# leave all unknown condition callables alone as equals
|
||||
return 0
|
||||
|
||||
conditionlist = conditions.items()
|
||||
conditionlist = list(conditions.items())
|
||||
conditionlist.sort(cmp_conditions)
|
||||
|
||||
# Apply conditions to column data to find what we want
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue