]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backported change in shutdown(); now takes an optional handler-list argument.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 11 Jan 2007 20:08:56 +0000 (20:08 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 11 Jan 2007 20:08:56 +0000 (20:08 +0000)
Lib/logging/__init__.py

index 07f1add37ace601f1bd6c84d1f777efc17b6f691..9f3f26c59e1b2ae87e4b509a0f782537a81ed5f8 100644 (file)
@@ -1318,14 +1318,14 @@ def disable(level):
     """
     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: