summaryrefslogtreecommitdiffstats
path: root/pym/portage_exception.py
diff options
context:
space:
mode:
authorJason Stubbs <jstubbs@gentoo.org>2005-08-28 08:37:44 +0000
committerJason Stubbs <jstubbs@gentoo.org>2005-08-28 08:37:44 +0000
commitd9fc4acc572c6647a4f27b838d35d27d805d190e (patch)
tree262a8de35d8c7567312757da5f1f66efdc8cece5 /pym/portage_exception.py
downloadportage-d9fc4acc572c6647a4f27b838d35d27d805d190e.tar.gz
portage-d9fc4acc572c6647a4f27b838d35d27d805d190e.tar.bz2
portage-d9fc4acc572c6647a4f27b838d35d27d805d190e.zip
Migration (without history) of the current stable line to subversion.
svn path=/main/branches/2.0/; revision=1941
Diffstat (limited to 'pym/portage_exception.py')
-rw-r--r--pym/portage_exception.py163
1 files changed, 163 insertions, 0 deletions
diff --git a/pym/portage_exception.py b/pym/portage_exception.py
new file mode 100644
index 000000000..b37f7caa4
--- /dev/null
+++ b/pym/portage_exception.py
@@ -0,0 +1,163 @@
+# Copyright 1998-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-src/portage/pym/portage_exception.py,v 1.8.2.1 2005/01/16 02:35:33 carpaski Exp $
+cvs_id_string="$Id: portage_exception.py,v 1.8.2.1 2005/01/16 02:35:33 carpaski Exp $"[5:-2]
+
+class PortageException(Exception):
+ """General superclass for portage exceptions"""
+ def __init__(self,value):
+ self.value = value[:]
+ def __str__(self):
+ return repr(self.value)
+
+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 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)
+