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
32fb6a81
Commit
32fb6a81
authored
Sep 25, 2010
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #9945: logging: Fixed locking bugs in addHandler/removeHandler.
parent
fda2106a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
Lib/logging/__init__.py
Lib/logging/__init__.py
+11
-7
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/logging/__init__.py
View file @
32fb6a81
...
...
@@ -1226,19 +1226,23 @@ class Logger(Filterer):
"""
Add the specified handler to this logger.
"""
_acquireLock
()
try
:
if
not
(
hdlr
in
self
.
handlers
):
self
.
handlers
.
append
(
hdlr
)
finally
:
_releaseLock
()
def
removeHandler
(
self
,
hdlr
):
"""
Remove the specified handler from this logger.
"""
if
hdlr
in
self
.
handlers
:
hdlr
.
acquire
()
_acquireLock
()
try
:
if
hdlr
in
self
.
handlers
:
self
.
handlers
.
remove
(
hdlr
)
finally
:
hdlr
.
release
()
_releaseLock
()
def
hasHandlers
(
self
):
"""
...
...
Misc/NEWS
View file @
32fb6a81
...
...
@@ -68,6 +68,8 @@ Core and Builtins
Library
-------
- Issue #9945: logging: Fixed locking bugs in addHandler/removeHandler.
- Issue #9936: Fixed executable lines' search in the trace module.
- Issue #9790: Rework imports necessary for samefile and sameopenfile
...
...
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