Explorar el Código

Call log handler close() instead of underlying stream's close.

Ask Solem hace 16 años
padre
commit
2c2e646d1c
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      celery/log.py

+ 2 - 2
celery/log.py

@@ -15,8 +15,8 @@ def setup_logger(loglevel=DAEMON_LOG_LEVEL, logfile=None, format=LOG_FORMAT,
     """
     logger = multiprocessing.get_logger()
     for handler in logger.handlers:
-        if hasattr(handler, "stream"):
-            handler.stream.close()
+        if hasattr(handler, "close"):
+            handler.close()
     logger.handlers = []
     if logfile:
         if hasattr(logfile, "write"):