Commit 805ddaa3 authored by Vinay Sajip's avatar Vinay Sajip

Issue #9947: logging: backported locking fix from py3k.

parent 3ab905f1
......@@ -19,7 +19,7 @@ Configuration functions for the logging package for Python. The core package
is based on PEP 282 and comments thereto in comp.lang.python, and influenced
by Apache's log4j system.
Copyright (C) 2001-2008 Vinay Sajip. All Rights Reserved.
Copyright (C) 2001-2010 Vinay Sajip. All Rights Reserved.
To use, simply 'import logging' and log away!
"""
......@@ -370,8 +370,10 @@ def stopListening():
Stop the listening server which was created with a call to listen().
"""
global _listener
if _listener:
logging._acquireLock()
try:
if _listener:
_listener.abort = 1
_listener = None
finally:
logging._releaseLock()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment