[Python-checkins] r51206 - in python/trunk: Lib/logging/__init__.py Misc/NEWS

georg.brandl python-checkins at python.org
Fri Aug 11 09:26:17 CEST 2006


Author: georg.brandl
Date: Fri Aug 11 09:26:10 2006
New Revision: 51206

Modified:
   python/trunk/Lib/logging/__init__.py
   python/trunk/Misc/NEWS
Log:
logging's atexit hook now runs even if the rest of the module has
already been cleaned up.


Modified: python/trunk/Lib/logging/__init__.py
==============================================================================
--- python/trunk/Lib/logging/__init__.py	(original)
+++ python/trunk/Lib/logging/__init__.py	Fri Aug 11 09:26:10 2006
@@ -1337,14 +1337,14 @@
     """
     root.manager.disable = level
 
-def shutdown():
+def shutdown(handlerList=_handlerList):
     """
     Perform any cleanup actions in the logging system (e.g. flushing
     buffers).
 
     Should be called at application exit.
     """
-    for h in _handlerList[:]: # was _handlers.keys():
+    for h in handlerList[:]:
         #errors might occur, for example, if files are locked
         #we just ignore them if raiseExceptions is not set
         try:

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Fri Aug 11 09:26:10 2006
@@ -38,6 +38,9 @@
 Library
 -------
 
+- logging's atexit hook now runs even if the rest of the module has
+  already been cleaned up.
+
 - Bug #1112549, DoS attack on cgi.FieldStorage.
 
 - Bug #1531405, format_exception no longer raises an exception if


More information about the Python-checkins mailing list