Fix test_shelve when it uses dumbdbm. Found and fixed by Larry Hastings.

This commit is contained in:
Neal Norwitz 2007-08-23 22:06:07 +00:00
parent 53cbdaa84c
commit 0f3cff58b2
1 changed files with 1 additions and 0 deletions

View File

@ -203,6 +203,7 @@ class _Database(UserDict.DictMixin):
return self._index.keys() return self._index.keys()
def __contains__(self, key): def __contains__(self, key):
key = key.decode("latin-1")
return key in self._index return key in self._index
def iterkeys(self): def iterkeys(self):