aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2018-04-28 15:59:21 -0700
committerZac Medico <zmedico@gentoo.org>2018-04-28 16:05:25 -0700
commit97887768e3f5e8bc1b520b119fde97fed16cfe7d (patch)
treef5febb3109e0af12ba9998038a6f84324e0a5c62
parentMirrorDistTask: fix super in _async_wait (diff)
downloadportage-97887768.tar.gz
portage-97887768.tar.bz2
portage-97887768.zip
PortageKeyError: fix __unicode__ AttributeError under python2.7
File "pym/portage/exception.py", line 32, in __unicode__ if isinstance(self.value, unicode): AttributeError: 'PortageKeyError' object has no attribute 'value'
-rw-r--r--pym/portage/exception.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/portage/exception.py b/pym/portage/exception.py
index 263cdf087..aed8beeb9 100644
--- a/pym/portage/exception.py
+++ b/pym/portage/exception.py
@@ -44,6 +44,9 @@ class PortageException(Exception):
class PortageKeyError(KeyError, PortageException):
__doc__ = KeyError.__doc__
+ def __init__(self, value):
+ KeyError.__init__(self, value)
+ PortageException.__init__(self, value)
class CorruptionError(PortageException):
"""Corruption indication"""