summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/exception.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/exception.py b/pym/portage/exception.py
index 39901ed07..f8388e2b6 100644
--- a/pym/portage/exception.py
+++ b/pym/portage/exception.py
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
import sys
-from portage import _unicode_encode
+from portage import _unicode_encode, _unicode_decode
from portage.localization import _
if sys.hexversion >= 0x3000000:
@@ -22,6 +22,10 @@ class PortageException(Exception):
else:
return repr(self.value)
+ if sys.hexversion < 0x3000000:
+ def __unicode__(self):
+ return _unicode_decode(self.__str__())
+
class CorruptionError(PortageException):
"""Corruption indication"""