mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Bug #1339007: Shelf objects now don't raise an exception in their
__del__ method when initialization failed.
This commit is contained in:
parent
d825143be1
commit
2605ca8773
2 changed files with 6 additions and 0 deletions
|
@ -139,6 +139,9 @@ class Shelf(UserDict.DictMixin):
|
|||
self.dict = 0
|
||||
|
||||
def __del__(self):
|
||||
if not hasattr(self, 'writeback'):
|
||||
# __init__ didn't succeed, so don't bother closing
|
||||
return
|
||||
self.close()
|
||||
|
||||
def sync(self):
|
||||
|
|
|
@ -156,6 +156,9 @@ Extension Modules
|
|||
Library
|
||||
-------
|
||||
|
||||
- Bug #1339007: Shelf objects now don't raise an exception in their
|
||||
__del__ method when initialization failed.
|
||||
|
||||
- Patch #1455898: The MBCS codec now supports the incremental mode for
|
||||
double-byte encodings.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue