diff options
Diffstat (limited to 'Lib/shelve.py')
-rw-r--r-- | Lib/shelve.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/shelve.py b/Lib/shelve.py index b05c627..8f709a2 100644 --- a/Lib/shelve.py +++ b/Lib/shelve.py @@ -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. |