]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix stupid bug (db should be dict)
authorGuido van Rossum <guido@python.org>
Mon, 27 Feb 1995 13:15:29 +0000 (13:15 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 27 Feb 1995 13:15:29 +0000 (13:15 +0000)
Lib/shelve.py

index deb8e2264104ba1ee584e79f667d3f829cd9c312..fcd52ec168698f9759e32e5d53f41cdddeec169f 100644 (file)
@@ -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()