diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-02-19 12:42:42 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-02-19 12:42:42 +0000 |
commit | d951bf3bfa91bd97e177eb6cf08adc688b4f169c (patch) | |
tree | d6521d4f8b0b7c18042a49f6a2257f8061477c4e | |
parent | 1b83c9cc1d75a28320dd72e3f1875c481d971f7e (diff) | |
download | portage-d951bf3bfa91bd97e177eb6cf08adc688b4f169c.tar.gz portage-d951bf3bfa91bd97e177eb6cf08adc688b4f169c.tar.bz2 portage-d951bf3bfa91bd97e177eb6cf08adc688b4f169c.zip |
Decode terminal codes from binary when necessary, for python-3.0 compatibility
since sys.stdout is a text stream.
svn path=/main/trunk/; revision=12649
-rw-r--r-- | pym/_emerge/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index e8d634929..a5802bbe5 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -9625,6 +9625,9 @@ class JobStatusDisplay(object): for k, capname in self._termcap_name_map.iteritems(): term_codes[k] = self._default_term_codes[capname] object.__setattr__(self, "_term_codes", term_codes) + for k, v in self._term_codes.items(): + if not isinstance(v, str): + self._term_codes[k] = v.decode() def _init_term(self): """ |