From: Vinay Sajip Date: Thu, 11 Jan 2007 20:08:56 +0000 (+0000) Subject: Backported change in shutdown(); now takes an optional handler-list argument. X-Git-Tag: v2.4.5c1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e518551a916b074d735679221c0bde95972e1821;p=thirdparty%2FPython%2Fcpython.git Backported change in shutdown(); now takes an optional handler-list argument. --- diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 07f1add37ace..9f3f26c59e1b 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -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: