diff options
Diffstat (limited to 'pym/_emerge/UseFlagDisplay.py')
-rw-r--r-- | pym/_emerge/UseFlagDisplay.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/pym/_emerge/UseFlagDisplay.py b/pym/_emerge/UseFlagDisplay.py index db2d6ca16..3721ef09e 100644 --- a/pym/_emerge/UseFlagDisplay.py +++ b/pym/_emerge/UseFlagDisplay.py @@ -1,9 +1,13 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +import sys + +from portage import _encodings, _unicode_encode from portage.output import red from portage.util import cmp_sort_key from portage.output import blue + class UseFlagDisplay(object): __slots__ = ('name', 'enabled', 'forced') @@ -24,6 +28,14 @@ class UseFlagDisplay(object): s = '(%s)' % s return s + if sys.hexversion < 0x3000000: + + __unicode__ = __str__ + + def __str__(self): + return _unicode_encode(self.__unicode__(), + encoding=_encodings['content']) + def _cmp_combined(a, b): """ Sort by name, combining enabled and disabled flags. |