Mercurial > cpython-lru_cache-weakref
diff Lib/logging/__init__.py @ 39439:1087df00a6e8 legacy-trunk
logging's atexit hook now runs even if the rest of the module has
already been cleaned up.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Fri, 11 Aug 2006 07:26:10 +0000 |
| parents | 4cb9dc0dc3f9 |
| children | 8da6dda679f8 4da4de954012 |
line wrap: on
line diff
--- a/Lib/logging/__init__.py Fri Aug 11 07:15:38 2006 +0000 +++ b/Lib/logging/__init__.py Fri Aug 11 07:26:10 2006 +0000 @@ -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:
