Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4e24dc55
Commit
4e24dc55
authored
Jun 14, 2006
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #1339007: Shelf objects now don't raise an exception in their
__del__ method when initialization failed.
parent
1d369fe7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
Lib/shelve.py
Lib/shelve.py
+3
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/shelve.py
View file @
4e24dc55
...
...
@@ -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
):
...
...
Misc/NEWS
View file @
4e24dc55
...
...
@@ -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
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment