]>
git.ipfire.org Git - people/ms/pakfire.git/blob - python/pakfire/errors.py
2 ###############################################################################
4 # Pakfire - The IPFire package management system #
5 # Copyright (C) 2011 Pakfire development team #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
20 ###############################################################################
24 class commandTimeoutExpired(Exception):
25 pass # XXX cannot be as is
27 class Error(Exception):
30 message
= _("An unhandled error occured.")
33 class ActionError(Error
):
36 class BuildAbortedException(Error
):
39 class BuildError(Error
):
42 class BuildRootLocked(Error
):
45 class CompressionError(Error
):
46 message
= _("Could not compress/decompress data.")
49 class ConfigError(Error
):
52 class DatabaseError(Error
):
55 class DependencyError(Error
):
58 message
= _("One or more dependencies could not been resolved.")
60 class DownloadError(Error
):
61 message
= _("An error occured when pakfire tried to download files.")
64 class FileError(Error
):
67 class FileNotFoundError(Error
):
70 class NotAnIPFireSystemError(Error
):
73 class OfflineModeError(Error
):
74 message
= _("The requested action cannot be done on offline mode.\n"
75 "Please connect your system to the network, remove --offline from the"
76 " command line and try again.")
78 class PackageFormatUnsupportedError(Error
):
81 class PakfireError(Error
):
85 class PakfireContainerError(Error
):
86 message
= _("Running pakfire-build in a pakfire container?")
89 class ShellEnvironmentError(Error
):
93 class SignatureError(Error
):
97 class TransactionCheckError(Error
):
98 message
= _("Transaction test was not successful")
101 class TransportError(Error
):
105 class TransportBadGatewayError(TransportError
):
109 class TransportConnectionError(TransportError
):
113 class TransportConnectionDNSError(TransportConnectionError
):
117 class TransportConnectionProxyError(TransportConnectionError
):
121 class TransportConnectionReadError(TransportConnectionError
):
125 class TransportConnectionResetError(TransportConnectionError
):
129 class TransportConnectionTimeoutError(TransportConnectionError
):
133 class TransportConnectionWriteError(TransportConnectionError
):
137 class TransportSSLError(TransportConnectionError
):
141 class TransportSSLCertificateExpiredError(TransportSSLError
):
145 class TransportInternalServerError(TransportError
):
149 class TransportForbiddenError(TransportError
):
153 class TransportMaxTriesExceededError(TransportError
):
157 class TransportNotFoundError(TransportError
):
161 class XMLRPCError(Error
):
162 message
= _("Generic XMLRPC error.")
165 class XMLRPCForbiddenError(XMLRPCError
):
166 message
= _("You are forbidden to perform this action. Maybe you need to check your credentials.")
169 class XMLRPCInternalServerError(XMLRPCError
):
170 message
= _("A request could not be fulfilled by the server.")
173 class XMLRPCNotFoundError(XMLRPCError
):
174 message
= _("Could not find the requested URL.")
177 class XMLRPCTransportError(XMLRPCError
):
178 message
= _("An unforseable problem on the XML-RPC transport connection occured.")