From: Georg Brandl Date: Sat, 12 Aug 2006 08:32:02 +0000 (+0000) Subject: Repair logging test spew caused by rev. 51206. X-Git-Tag: v2.5c1~68 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3e304297e94b9b1956a4ed95debd1b163958d71;p=python Repair logging test spew caused by rev. 51206. --- diff --git a/Lib/logging/config.py b/Lib/logging/config.py index 511e65937e..5ea0d15b64 100644 --- a/Lib/logging/config.py +++ b/Lib/logging/config.py @@ -79,7 +79,7 @@ def fileConfig(fname, defaults=None): logging._acquireLock() try: logging._handlers.clear() - logging._handlerList = [] + del logging._handlerList[:] # Handlers add themselves to logging._handlers handlers = _install_handlers(cp, formatters) _install_loggers(cp, handlers) diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 68c23c218b..ee34f8c1ba 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -493,7 +493,7 @@ def test4(): try: logging._handlers.clear() logging._handlers.update(saved_handlers) - logging._handlerList = saved_handler_list + logging._handlerList[:] = saved_handler_list loggerDict = logging.getLogger().manager.loggerDict loggerDict.clear() loggerDict.update(saved_loggers) @@ -560,7 +560,7 @@ def test5(): try: logging._handlers.clear() logging._handlers.update(saved_handlers) - logging._handlerList = saved_handler_list + logging._handlerList[:] = saved_handler_list loggerDict = logging.getLogger().manager.loggerDict loggerDict.clear() loggerDict.update(saved_loggers)