summaryrefslogtreecommitdiffstats
path: root/pym/portage/exception.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-26 14:29:34 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-26 14:29:34 -0700
commitbf9b3e70758454afa53972340abc98a248195e45 (patch)
treebe006323ea37fcad7be18d99821d883cfe9bc6ec /pym/portage/exception.py
parent1112bbcd7f74e8fc507d0057fb153c9bbed8fc50 (diff)
downloadportage-bf9b3e70758454afa53972340abc98a248195e45.tar.gz
portage-bf9b3e70758454afa53972340abc98a248195e45.tar.bz2
portage-bf9b3e70758454afa53972340abc98a248195e45.zip
Make the Atom class add 'EAPI.incompatible' category attributes to
InvalidAtom exceptions, make use_reduce() raise InvalidDependString exceptions that encapsulate InvalidAtom exceptions, and make Package._validate_deps() use the InvalidAtom categories when recording the invalid metadata for use by repoman. Also, remove the EAPI.incompatible code from repoman that's no longer used.
Diffstat (limited to 'pym/portage/exception.py')
-rw-r--r--pym/portage/exception.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pym/portage/exception.py b/pym/portage/exception.py
index f8388e2b6..b289b6285 100644
--- a/pym/portage/exception.py
+++ b/pym/portage/exception.py
@@ -31,6 +31,9 @@ class CorruptionError(PortageException):
class InvalidDependString(PortageException):
"""An invalid depend string has been encountered"""
+ def __init__(self, value, errors=None):
+ PortageException.__init__(self, value)
+ self.errors = errors
class InvalidVersionString(PortageException):
"""An invalid version string has been encountered"""
@@ -102,6 +105,9 @@ class InvalidPackageName(PortagePackageException):
class InvalidAtom(PortagePackageException):
"""Malformed atom spec"""
+ def __init__(self, value, category=None):
+ PortagePackageException.__init__(self, value)
+ self.category = category
class UnsupportedAPIException(PortagePackageException):
"""Unsupported API"""