The logging module says (in the code) that logging. shutdown() should be called at application exit, but there is no way to enforce this -- particularly with an interactive session. Calling it twice leads to errors. This patch (1) Makes it safe to call shutdown more than once. (2) Uses atexit (with a workaround for Python 1.5) to flush and close buffers automatically when the system is shutting down normally.
Logged In: YES user_id=308438 A version of this patch has been accepted and checked into CVS. The shutdown() call is now safe because closing a handler removes it from the internal list used by shutdown(). Thank you for the patch.