Update shelve.py
This commit is contained in:
parent
7e6728f780
commit
25d40f78e3
|
@ -165,8 +165,7 @@ class Shelf(collections.abc.MutableMapping):
|
|||
if self.writeback and self.cache:
|
||||
self.writeback = False
|
||||
for key, entry in self.cache.items():
|
||||
if key not in self:
|
||||
self[key] = entry
|
||||
self[key] = entry
|
||||
self.writeback = True
|
||||
self.cache = {}
|
||||
if hasattr(self.dict, 'sync'):
|
||||
|
|
Loading…
Reference in New Issue