summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/shelve.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/shelve.py b/Lib/shelve.py
index deb8e22..fcd52ec 100644
--- a/Lib/shelve.py
+++ b/Lib/shelve.py
@@ -65,9 +65,9 @@ class Shelf:
del self.dict[key]
def close(self):
- if hasattr(self.db, 'close'):
- self.db.close()
- self.db = None
+ if hasattr(self.dict, 'close'):
+ self.dict.close()
+ self.dict = None
def __del__(self):
self.close()