]>
Commit | Line | Data |
---|---|---|
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 |
22 | from i18n import _ |
23 | ||
94438733 MT |
24 | class commandTimeoutExpired(Exception): |
25 | pass # XXX cannot be as is | |
26 | ||
47a4cb89 | 27 | class Error(Exception): |
60845a36 MT |
28 | exit_code = 1 |
29 | ||
30 | message = _("An unhandled error occured.") | |
31 | ||
32 | ||
1e80d5d7 MT |
33 | class ActionError(Error): |
34 | pass | |
47a4cb89 | 35 | |
3ad4bb5a MT |
36 | class BuildAbortedException(Error): |
37 | pass | |
38 | ||
47a4cb89 MT |
39 | class BuildError(Error): |
40 | pass | |
41 | ||
42 | class BuildRootLocked(Error): | |
43 | pass | |
44 | ||
97d7d682 MT |
45 | class CompressionError(Error): |
46 | message = _("Could not compress/decompress data.") | |
47 | ||
48 | ||
47a4cb89 MT |
49 | class ConfigError(Error): |
50 | pass | |
51 | ||
cabf1fbe MT |
52 | class DatabaseError(Error): |
53 | pass | |
54 | ||
348d903a | 55 | class DependencyError(Error): |
60845a36 MT |
56 | exit_code = 4 |
57 | ||
58 | message = _("One or more dependencies could not been resolved.") | |
348d903a | 59 | |
47a4cb89 MT |
60 | class DownloadError(Error): |
61 | pass | |
62 | ||
9e8b1d7a MT |
63 | class FileError(Error): |
64 | pass | |
65 | ||
7c8f2953 MT |
66 | class FileNotFoundError(Error): |
67 | pass | |
68 | ||
7b1e25fd MT |
69 | class NotAnIPFireSystemError(Error): |
70 | pass | |
71 | ||
6a509182 MT |
72 | class OfflineModeError(Error): |
73 | message = _("The requested action cannot be done on offline mode.\n" | |
74 | "Please connect your system to the network, remove --offline from the" | |
75 | " command line and try again.") | |
76 | ||
c07a3ca7 MT |
77 | class PackageFormatUnsupportedError(Error): |
78 | pass | |
79 | ||
f781b1ab MT |
80 | class PakfireError(Error): |
81 | pass | |
82 | ||
936f6b37 MT |
83 | |
84 | class PakfireContainerError(Error): | |
85 | message = _("Running pakfire-build in a pakfire container?") | |
862bea4d MT |
86 | |
87 | ||
88 | class TransactionCheckError(Error): | |
89 | message = _("Transaction test was not successful") |