From d76337003072f96a2aada7b72715efbb80a3ca3b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 20 Sep 2009 22:08:22 +0000 Subject: Misc unicode fixes for repoman. svn path=/main/trunk/; revision=14302 --- pym/portage/output.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pym/portage/output.py') 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: -- cgit v1.2.3-1-g7c22