[Python-checkins] r64592 - python/trunk/Lib/logging/config.py

vinay.sajip python-checkins at python.org
Sun Jun 29 23:25:30 CEST 2008


Author: vinay.sajip
Date: Sun Jun 29 23:25:28 2008
New Revision: 64592

Log:
Removed out-of-date comment in _install_handlers and
used issubclass in place of equality comparison of classes.

Modified:
   python/trunk/Lib/logging/config.py

Modified: python/trunk/Lib/logging/config.py
==============================================================================
--- python/trunk/Lib/logging/config.py	(original)
+++ python/trunk/Lib/logging/config.py	Sun Jun 29 23:25:28 2008
@@ -155,8 +155,7 @@
             h.setLevel(logging._levelNames[level])
         if len(fmt):
             h.setFormatter(formatters[fmt])
-        #temporary hack for FileHandler and MemoryHandler.
-        if klass == logging.handlers.MemoryHandler:
+        if issubclass(klass, logging.handlers.MemoryHandler):
             if "target" in opts:
                 target = cp.get(sectname,"target")
             else:


More information about the Python-checkins mailing list