Encode messages to utf-8 before writing them to the console in util.multi_log.

This commit is contained in:
Daniel Watkins 2015-02-11 11:55:25 +00:00
parent 3abe192555
commit 03566461c4

View File

@ -405,7 +405,7 @@ def multi_log(text, console=True, stderr=True,
conpath = "/dev/console"
if os.path.exists(conpath):
with open(conpath, 'wb') as wfh:
wfh.write(text)
wfh.write(text.encode('utf-8'))
wfh.flush()
else:
# A container may lack /dev/console (arguably a container bug). If