diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2016-02-11 13:59:11 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2016-02-20 23:38:46 +0000 |
commit | 9221b55cee153be455b86858aea89486537206dd (patch) | |
tree | 2a1f5c85b30467af60697c60ff564518e1bd3a5d | |
parent | a88aa98d34ace2f3bab236e7acfffee73584b228 (diff) | |
download | morph-9221b55cee153be455b86858aea89486537206dd.tar.gz |
Avoid UnicodeDecodeError when writing to log files
This is the counterpart fix to b3ecd02236e58386ac4d7566ef70e751ff0d7e26,
which had broken the Morph test suite, as it turns out.
Change-Id: If67aa99275a70c62516fb4473e348783888cd0c4
-rw-r--r-- | distbuild/initiator.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/distbuild/initiator.py b/distbuild/initiator.py index e02f6404..56820fc2 100644 --- a/distbuild/initiator.py +++ b/distbuild/initiator.py @@ -1,6 +1,6 @@ # distbuild/initiator.py -- state machine for the initiator # -# Copyright (C) 2012, 2014-2015 Codethink Limited +# Copyright (C) 2012, 2014-2016 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -230,8 +230,8 @@ class Initiator(distbuild.StateMachine): step_name = msg['step_name'] if step_name in self._step_outputs: f = self._get_output(msg) - f.write(msg['stdout']) - f.write(msg['stderr']) + f.write(msg['stdout'].decode('unicode-escape')) + f.write(msg['stderr'].decode('unicode-escape')) f.flush() else: logging.warning( |