diff options
author | Georg Brandl <georg@python.org> | 2006-08-11 07:26:10 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-08-11 07:26:10 (GMT) |
commit | 0a7d1bb168e998cd1ddba0f699c6142093e1f530 (patch) | |
tree | b490cdfea49a6f55097b653d913df48f311796a2 /Lib/logging | |
parent | 368c155d05c4df7f4b13c533685699c30e79bb26 (diff) | |
download | cpython-0a7d1bb168e998cd1ddba0f699c6142093e1f530.zip cpython-0a7d1bb168e998cd1ddba0f699c6142093e1f530.tar.gz cpython-0a7d1bb168e998cd1ddba0f699c6142093e1f530.tar.bz2 |
logging's atexit hook now runs even if the rest of the module has
already been cleaned up.
Diffstat (limited to 'Lib/logging')
-rw-r--r-- | Lib/logging/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index e8852f3..dc3400d 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -1337,14 +1337,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: |