]> git.ipfire.org Git - pakfire.git/blob - python/pakfire/errors.py
Merge branch 'master' of ssh://git.ipfire.org/pub/git/oddments/pakfire
[pakfire.git] / python / pakfire / errors.py
1 #!/usr/bin/python
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 ###############################################################################
21
22 from i18n import _
23
24 class commandTimeoutExpired(Exception):
25 pass # XXX cannot be as is
26
27 class Error(Exception):
28 exit_code = 1
29
30 message = _("An unhandled error occured.")
31
32
33 class ActionError(Error):
34 pass
35
36 class BuildAbortedException(Error):
37 pass
38
39 class BuildError(Error):
40 pass
41
42 class BuildRootLocked(Error):
43 pass
44
45 class ConfigError(Error):
46 pass
47
48 class DependencyError(Error):
49 exit_code = 4
50
51 message = _("One or more dependencies could not been resolved.")
52
53 class DownloadError(Error):
54 pass
55
56 class FileError(Error):
57 pass
58
59 class FileNotFoundError(Error):
60 pass
61
62 class NotAnIPFireSystemError(Error):
63 pass
64
65 class OfflineModeError(Error):
66 message = _("The requested action cannot be done on offline mode.\n"
67 "Please connect your system to the network, remove --offline from the"
68 " command line and try again.")
69
70 class PackageFormatUnsupportedError(Error):
71 pass
72
73 class PakfireError(Error):
74 pass
75
76
77 class PakfireContainerError(Error):
78 message = _("Running pakfire-build in a pakfire container?")