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
90de820d
Commit
90de820d
authored
Aug 23, 2010
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #9501: Fixed logging regressions in cleanup code.
parent
af688ead
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
8 deletions
+22
-8
Lib/logging/__init__.py
Lib/logging/__init__.py
+20
-8
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/logging/__init__.py
View file @
90de820d
...
@@ -609,12 +609,16 @@ def _removeHandlerRef(wr):
...
@@ -609,12 +609,16 @@ def _removeHandlerRef(wr):
"""
"""
Remove a handler reference from the internal cleanup list.
Remove a handler reference from the internal cleanup list.
"""
"""
_acquireLock
()
# This function can be called during module teardown, when globals are
try
:
# set to None. If _acquireLock is None, assume this is the case and do
if
wr
in
_handlerList
:
# nothing.
_handlerList
.
remove
(
wr
)
if
_acquireLock
is
not
None
:
finally
:
_acquireLock
()
_releaseLock
()
try
:
if
wr
in
_handlerList
:
_handlerList
.
remove
(
wr
)
finally
:
_releaseLock
()
def
_addHandlerRef
(
handler
):
def
_addHandlerRef
(
handler
):
"""
"""
...
@@ -1604,8 +1608,16 @@ def shutdown(handlerList=_handlerList):
...
@@ -1604,8 +1608,16 @@ def shutdown(handlerList=_handlerList):
#we just ignore them if raiseExceptions is not set
#we just ignore them if raiseExceptions is not set
try
:
try
:
h
=
wr
()
h
=
wr
()
h
.
flush
()
if
h
:
h
.
close
()
try
:
h
.
flush
()
h
.
close
()
except
(
IOError
,
ValueError
):
# Ignore errors which might be caused
# because handlers have been closed but
# references to them are still around at
# application exit.
pass
except
:
except
:
if
raiseExceptions
:
if
raiseExceptions
:
raise
raise
...
...
Misc/NEWS
View file @
90de820d
...
@@ -123,6 +123,8 @@ Extensions
...
@@ -123,6 +123,8 @@ Extensions
Library
Library
-------
-------
- Issue #9501: Fixed logging regressions in cleanup code.
- Fix functools.total_ordering() to actually work.
- Fix functools.total_ordering() to actually work.
- Issue #9572: Importlib should not raise an exception if a directory it
- Issue #9572: Importlib should not raise an exception if a directory it
...
...
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