commit: 97887768e3f5e8bc1b520b119fde97fed16cfe7d
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 28 22:59:21 2018 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Apr 28 23:05:25 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=97887768
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'
pym/portage/exception.py | 3 +++
1 file changed, 3 insertions(+)
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"""