naparuba/shinken — pull request #1371 by gst (2014-11-07 14:56:28+00:00)
Title: Use "original" sys.stdout.

Fix test:
something could have replaced sys.stdout.
So just make sure to use the original one by simply importing it early into the module and using it directly (without accessing it by/throuh 'sys').
Also check that encoding is set and default to ascii if not.