From 961eabb3326f2076a346413a2506d38273ad4bc8 Mon Sep 17 00:00:00 2001 From: benoitc Date: Fri, 16 Mar 2012 18:43:35 +0100 Subject: [PATCH] simplify the code --- examples/test.py | 1 + gunicorn/glogging.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/test.py b/examples/test.py index cf55bf0d..d7dfc951 100644 --- a/examples/test.py +++ b/examples/test.py @@ -21,5 +21,6 @@ def app(environ, start_response): ('Content-Length', str(len(data))), ('X-Gunicorn-Version', __version__) ] + start_response(status, response_headers) return iter([data]) diff --git a/gunicorn/glogging.py b/gunicorn/glogging.py index fea26016..d312f770 100644 --- a/gunicorn/glogging.py +++ b/gunicorn/glogging.py @@ -107,9 +107,7 @@ class Logger(object): if cfg.errorlog != "-": # if an error log file is set redirect stdout & stderr to # this log file. - stdout_log = LazyWriter(cfg.errorlog, 'a') - sys.stdout = stdout_log - sys.stderr = stdout_log + sys.stdout = sys.stderr = LazyWriter(cfg.errorlog, 'a') # set gunicorn.error handler self._set_handler(self.error_log, cfg.errorlog,