]> git.ipfire.org Git - pakfire.git/blame - python/pakfire/errors.py
Rewrite code that forks subprocesses.
[pakfire.git] / python / pakfire / errors.py
CommitLineData
47a4cb89 1#!/usr/bin/python
b792d887
MT
2###############################################################################
3# #
4# Pakfire - The IPFire package management system #
5# Copyright (C) 2011 Pakfire development team #
6# #
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. #
11# #
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. #
16# #
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/>. #
19# #
20###############################################################################
47a4cb89 21
60845a36
MT
22from i18n import _
23
94438733
MT
24class commandTimeoutExpired(Exception):
25 pass # XXX cannot be as is
26
47a4cb89 27class Error(Exception):
60845a36
MT
28 exit_code = 1
29
30 message = _("An unhandled error occured.")
31
32
1e80d5d7
MT
33class ActionError(Error):
34 pass
47a4cb89 35
3ad4bb5a
MT
36class BuildAbortedException(Error):
37 pass
38
47a4cb89
MT
39class BuildError(Error):
40 pass
41
42class BuildRootLocked(Error):
43 pass
44
97d7d682
MT
45class CompressionError(Error):
46 message = _("Could not compress/decompress data.")
47
48
47a4cb89
MT
49class ConfigError(Error):
50 pass
51
cabf1fbe
MT
52class DatabaseError(Error):
53 pass
54
348d903a 55class DependencyError(Error):
60845a36
MT
56 exit_code = 4
57
58 message = _("One or more dependencies could not been resolved.")
348d903a 59
47a4cb89 60class DownloadError(Error):
516fc709
MT
61 message = _("An error occured when pakfire tried to download files.")
62
47a4cb89 63
9e8b1d7a
MT
64class FileError(Error):
65 pass
66
7c8f2953
MT
67class FileNotFoundError(Error):
68 pass
69
7b1e25fd
MT
70class NotAnIPFireSystemError(Error):
71 pass
72
6a509182
MT
73class 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.")
77
c07a3ca7
MT
78class PackageFormatUnsupportedError(Error):
79 pass
80
f781b1ab
MT
81class PakfireError(Error):
82 pass
83
936f6b37
MT
84
85class PakfireContainerError(Error):
86 message = _("Running pakfire-build in a pakfire container?")
862bea4d
MT
87
88
64ffcd37
MT
89class ShellEnvironmentError(Error):
90 pass
91
92
81bb7698
MT
93class SignatureError(Error):
94 pass
95
96
862bea4d
MT
97class TransactionCheckError(Error):
98 message = _("Transaction test was not successful")
37ff3f8f
MT
99
100
101class XMLRPCError(Error):
102 message = _("Generic XMLRPC error.")
103
104
105class XMLRPCForbiddenError(XMLRPCError):
106 message = _("You are forbidden to perform this action. Maybe you need to check your credentials.")
107
108
e3eb9333
MT
109class XMLRPCInternalServerError(XMLRPCError):
110 message = _("A request could not be fulfilled by the server.")
111
112
37ff3f8f
MT
113class XMLRPCNotFoundError(XMLRPCError):
114 message = _("Could not find the requested URL.")
115
116
117class XMLRPCTransportError(XMLRPCError):
118 message = _("An unforseable problem on the XML-RPC transport connection occured.")