Bug #1396678: a closed bsddb.DB raises AttributeError on repr().

It now returns "{}". Is that the correct solution?
This commit is contained in:
Georg Brandl 2006-02-19 00:53:54 +00:00
parent bb45973455
commit 26caeba35a

View File

@ -112,7 +112,10 @@ class _iter_mixin(UserDict.DictMixin):
def iteritems(self):
try:
cur = self._make_iter_cursor()
try:
cur = self._make_iter_cursor()
except AttributeError:
return
# FIXME-20031102-greg: race condition. cursor could
# be closed by another thread before this call.