Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ab905f commit 805ddaaCopy full SHA for 805ddaa
1 file changed
Lib/logging/config.py
@@ -19,7 +19,7 @@
19
is based on PEP 282 and comments thereto in comp.lang.python, and influenced
20
by Apache's log4j system.
21
22
-Copyright (C) 2001-2008 Vinay Sajip. All Rights Reserved.
+Copyright (C) 2001-2010 Vinay Sajip. All Rights Reserved.
23
24
To use, simply 'import logging' and log away!
25
"""
@@ -370,8 +370,10 @@ def stopListening():
370
Stop the listening server which was created with a call to listen().
371
372
global _listener
373
- if _listener:
374
- logging._acquireLock()
375
- _listener.abort = 1
376
- _listener = None
+ logging._acquireLock()
+ try:
+ if _listener:
+ _listener.abort = 1
377
+ _listener = None
378
+ finally:
379
logging._releaseLock()
0 commit comments