StdoutCapture: Fix duplicated (and buggy) code.

master
Valentin Lorentz 2013-06-02 17:39:13 +02:00
parent 5bbcfa92fe
commit d7f89cc97f
1 changed files with 2 additions and 4 deletions

View File

@ -83,10 +83,8 @@ class StdoutCapture(callbacks.Plugin):
logger = logger()
if not hasattr(logger, 'stream'):
continue
if logger.stream is sys.stdout:
logger.stream = sys.stderr._real
elif logger.stream is sys.stderr:
logger.stream = sys.stderr._real
if logger.stream in (sys.stdout, sys.stderr):
logger.stream = logger.stream._real
sys.stdout = sys.stdout._real
sys.stderr = sys.stderr._real