/[gentoo-src]/portage/pym/portage_exception.py
Gentoo

Contents of /portage/pym/portage_exception.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download) (as text)
Sat Feb 26 06:35:20 2005 UTC (9 years, 9 months ago) by jstubbs
Branch: MAIN
CVS Tags: HEAD
Branch point for: portage_2_1
Changes since 1.9: +2 -1 lines
File MIME type: text/x-python
Brought forward changes from portage_2_0

1 # Copyright 1998-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-src/portage/pym/portage_exception.py,v 1.9 2004/11/15 21:42:50 carpaski Exp $
4 cvs_id_string="$Id: portage_exception.py,v 1.8.2.1 2005/01/16 02:35:33 carpaski Exp $"[5:-2]
5
6 class PortageException(Exception):
7 """General superclass for portage exceptions"""
8 def __init__(self,value):
9 self.value = value[:]
10 def __str__(self):
11 return repr(self.value)
12
13 class UnknownCondition(PortageException):
14 """Corruption indication"""
15 def __init__(self,value):
16 self.value = value[:]
17 def __str__(self):
18 return repr(self.value)
19
20 class CorruptionError(PortageException):
21 """Corruption indication"""
22 def __init__(self,value):
23 self.value = value[:]
24 def __str__(self):
25 return repr(self.value)
26
27 class InvalidDependString(PortageException):
28 """An invalid depend string has been encountered"""
29 def __init__(self,value):
30 self.value = value[:]
31 def __str__(self):
32 return repr(self.value)
33
34 class InvalidVersionString(PortageException):
35 """An invalid version string has been encountered"""
36 def __init__(self,value):
37 self.value = value[:]
38 def __str__(self):
39 return repr(self.value)
40
41 class SecurityViolation(PortageException):
42 """An incorrect formatting was passed instead of the expected one"""
43 def __init__(self,value):
44 self.value = value[:]
45 def __str__(self):
46 return repr(self.value)
47
48 class IncorrectParameter(PortageException):
49 """An parameter of the wrong type was passed"""
50 def __init__(self,value):
51 self.value = value[:]
52 def __str__(self):
53 return repr(self.value)
54
55 class MissingParameter(PortageException):
56 """An parameter is required for the action requested but was not passed"""
57 def __init__(self,value):
58 self.value = value[:]
59 def __str__(self):
60 return repr(self.value)
61
62
63 class InvalidData(PortageException):
64 """An incorrect formatting was passed instead of the expected one"""
65 def __init__(self,value):
66 self.value = value[:]
67 def __str__(self):
68 return repr(self.value)
69
70 class InvalidDataType(PortageException):
71 """An incorrect type was passed instead of the expected one"""
72 def __init__(self,value):
73 self.value = value[:]
74 def __str__(self):
75 return repr(self.value)
76
77
78
79
80 class InvalidLocation(PortageException):
81 """Data was not found when it was expected to exist or was specified incorrectly"""
82 def __init__(self,value):
83 self.value = value[:]
84 def __str__(self):
85 return repr(self.value)
86
87 class FileNotFound(InvalidLocation):
88 """A file was not found when it was expected to exist"""
89 def __init__(self,value):
90 self.value = value[:]
91 def __str__(self):
92 return repr(self.value)
93
94 class DirectoryNotFound(InvalidLocation):
95 """A directory was not found when it was expected to exist"""
96 def __init__(self,value):
97 self.value = value[:]
98 def __str__(self):
99 return repr(self.value)
100
101
102
103 class CommandNotFound(PortageException):
104 """A required binary was not available or executable"""
105 def __init__(self,value):
106 self.value = value[:]
107 def __str__(self):
108 return repr(self.value)
109
110
111
112 class PortagePackageException(PortageException):
113 """Malformed or missing package data"""
114 def __init__(self,value):
115 self.value = value[:]
116 def __str__(self):
117 return repr(self.value)
118
119 class PackageNotFound(PortagePackageException):
120 """Missing Ebuild or Binary"""
121 def __init__(self,value):
122 self.value = value[:]
123 def __str__(self):
124 return repr(self.value)
125
126 class InvalidPackageName(PortagePackageException):
127 """Malformed package name"""
128 def __init__(self,value):
129 self.value = value[:]
130 def __str__(self):
131 return repr(self.value)
132
133
134
135
136 class SignatureException(PortageException):
137 """Signature was not present in the checked file"""
138 def __init__(self,value):
139 self.value = value[:]
140 def __str__(self):
141 return repr(self.value)
142
143 class DigestException(SignatureException):
144 """A problem exists in the digest"""
145 def __init__(self,value):
146 self.value = value[:]
147 def __str__(self):
148 return repr(self.value)
149
150 class MissingSignature(SignatureException):
151 """Signature was not present in the checked file"""
152 def __init__(self,value):
153 self.value = value[:]
154 def __str__(self):
155 return repr(self.value)
156
157 class InvalidSignature(SignatureException):
158 """Signature was checked and was not a valid, current, nor trusted signature"""
159 def __init__(self,value):
160 self.value = value[:]
161 def __str__(self):
162 return repr(self.value)
163
164 class UntrustedSignature(SignatureException):
165 """Signature was not certified to the desired security level"""
166 def __init__(self,value):
167 self.value = value[:]
168 def __str__(self):
169 return repr(self.value)

  ViewVC Help
Powered by ViewVC 1.1.20