diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-09-20 22:08:22 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-09-20 22:08:22 +0000 |
commit | d76337003072f96a2aada7b72715efbb80a3ca3b (patch) | |
tree | 7a6e07ee9d93230f877ee69003a0c70f057226c0 /pym/portage/output.py | |
parent | 8eab4a8bca97d338fc141278b46d89d3e5a54360 (diff) | |
download | portage-d76337003072f96a2aada7b72715efbb80a3ca3b.tar.gz portage-d76337003072f96a2aada7b72715efbb80a3ca3b.tar.bz2 portage-d76337003072f96a2aada7b72715efbb80a3ca3b.zip |
Misc unicode fixes for repoman.
svn path=/main/trunk/; revision=14302
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: |