summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gentoo.org>2005-10-04 15:56:46 +0000
committerBrian Harring <ferringb@gentoo.org>2005-10-04 15:56:46 +0000
commit76d849b5475f4815da33bc438f82db3c0df0a3af (patch)
tree8d2cd63f9f73b89fcaceed43976d5d4e83aed88e
parent99b5f7dcd90923a274b02e2d109e7aebd5f4cf58 (diff)
downloadportage-76d849b5475f4815da33bc438f82db3c0df0a3af.tar.gz
portage-76d849b5475f4815da33bc438f82db3c0df0a3af.tar.bz2
portage-76d849b5475f4815da33bc438f82db3c0df0a3af.zip
god this module sucked.
Removed all of the duplicate code. svn path=/main/branches/2.0/; revision=2088
-rw-r--r--pym/portage_exception.py88
1 files changed, 1 insertions, 87 deletions
diff --git a/pym/portage_exception.py b/pym/portage_exception.py
index 54127beb4..d810876f1 100644
--- a/pym/portage_exception.py
+++ b/pym/portage_exception.py
@@ -12,122 +12,56 @@ class PortageException(Exception):
class CorruptionError(PortageException):
"""Corruption indication"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
class InvalidDependString(PortageException):
"""An invalid depend string has been encountered"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
class InvalidVersionString(PortageException):
"""An invalid version string has been encountered"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
class SecurityViolation(PortageException):
"""An incorrect formatting was passed instead of the expected one"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
class IncorrectParameter(PortageException):
"""An parameter of the wrong type was passed"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
class MissingParameter(PortageException):
"""An parameter is required for the action requested but was not passed"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
class InvalidData(PortageException):
"""An incorrect formatting was passed instead of the expected one"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
class InvalidDataType(PortageException):
"""An incorrect type was passed instead of the expected one"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
-
-
-
class InvalidLocation(PortageException):
"""Data was not found when it was expected to exist or was specified incorrectly"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
class FileNotFound(InvalidLocation):
"""A file was not found when it was expected to exist"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
class DirectoryNotFound(InvalidLocation):
"""A directory was not found when it was expected to exist"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
-
class CommandNotFound(PortageException):
"""A required binary was not available or executable"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
-
class PortagePackageException(PortageException):
"""Malformed or missing package data"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
class PackageNotFound(PortagePackageException):
"""Missing Ebuild or Binary"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
class InvalidPackageName(PortagePackageException):
"""Malformed package name"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
class UnsupportedAPIException(PortagePackageException):
"""Unsupported API"""
def __init__(self, cpv, api):
- self.cpv = cpv
- self.api = api
+ self.cpv, self.api = cpv, api
def __str__(self):
return "Unable to do any operations on '%s', due to the fact it's EAPI is higher then this portage versions. Please upgrade to a portage version that supports EAPI %s" % (self.cpv, self.eapi)
@@ -135,36 +69,16 @@ class UnsupportedAPIException(PortagePackageException):
class SignatureException(PortageException):
"""Signature was not present in the checked file"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
class DigestException(SignatureException):
"""A problem exists in the digest"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
class MissingSignature(SignatureException):
"""Signature was not present in the checked file"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
class InvalidSignature(SignatureException):
"""Signature was checked and was not a valid, current, nor trusted signature"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)
class UntrustedSignature(SignatureException):
"""Signature was not certified to the desired security level"""
- def __init__(self,value):
- self.value = value[:]
- def __str__(self):
- return repr(self.value)