diff options
Diffstat (limited to 'pym/portage/output.py')
-rw-r--r-- | pym/portage/output.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pym/portage/output.py b/pym/portage/output.py index a85647c4d..c21dc07ba 100644 --- a/pym/portage/output.py +++ b/pym/portage/output.py @@ -355,6 +355,11 @@ class ConsoleStyleFile(object): self._styles = styles def write(self, s): + # In python-2.6, DumbWriter.send_line_break() can write + # non-unicode '\n' which fails with TypeError if self._file + # is a text stream such as io.StringIO. Therefore, make sure + # input is converted to unicode when necessary. + s = _unicode_decode(s) global havecolor if havecolor and self._styles: for style in self._styles: |