From bf9b3e70758454afa53972340abc98a248195e45 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 26 Aug 2010 14:29:34 -0700 Subject: 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. --- pym/portage/exception.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pym/portage/exception.py') 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""" -- cgit v1.2.3-1-g7c22