Kaydet (Commit) 4fc70670 authored tarafından Roger E. Masse's avatar Roger E. Masse

Added a 'sync' method to shelve. If the underlying database does not have a sync

attribute, this method silently ignores this fact.  The default (bsddb's dbhash) does.
üst e8e87999
......@@ -72,6 +72,10 @@ class Shelf:
def __del__(self):
self.close()
def sync(self):
if hasattr(self.dict, 'sync'):
self.dict.sync()
class BsdDbShelf(Shelf):
"""Shelf implementation using the "BSD" db interface.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment