Module: check_mk
Branch: master
Commit: 90decf8ed48091fc964b95fe14f83849735c270f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=90decf8ed48091…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Nov 7 15:52:21 2016 +0100
console output: Fixed writing warnings/errors to stderr
---
cmk_base/console.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmk_base/console.py b/cmk_base/console.py
index 8ead6cd..a446502 100644
--- a/cmk_base/console.py
+++ b/cmk_base/console.py
@@ -46,8 +46,8 @@ def output(text, *args, **kwargs):
stream = kwargs.get("stream", sys.stdout)
try:
- sys.stdout.write(text)
- sys.stdout.flush()
+ stream.write(text)
+ stream.flush()
except:
# TODO: Way to generic!
pass # avoid exception on broken pipe (e.g. due to | head)