Package yum :: Module Errors
[hide private]
[frames] | no frames]

Source Code for Module yum.Errors

  1  #!/usr/bin/python -tt 
  2  # This program is free software; you can redistribute it and/or modify 
  3  # it under the terms of the GNU General Public License as published by 
  4  # the Free Software Foundation; either version 2 of the License, or 
  5  # (at your option) any later version. 
  6  # 
  7  # This program is distributed in the hope that it will be useful, 
  8  # but WITHOUT ANY WARRANTY; without even the implied warranty of 
  9  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 10  # GNU Library General Public License for more details. 
 11  # 
 12  # You should have received a copy of the GNU General Public License 
 13  # along with this program; if not, write to the Free Software 
 14  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
 15  # Copyright 2004 Duke University 
 16   
 17  """ 
 18  Exceptions and Errors thrown by yum. 
 19  """ 
 20   
 21  from i18n import to_unicode 
 22   
23 -class YumBaseError(Exception):
24 """ 25 Base Yum Error. All other Errors thrown by yum should inherit from 26 this. 27 """
28 - def __init__(self, value=None):
29 Exception.__init__(self) 30 self.value = value
31 - def __str__(self):
32 return "%s" %(self.value,)
33
34 - def __unicode__(self):
35 return '%s' % to_unicode(self.value)
36
37 -class YumGPGCheckError(YumBaseError):
38 pass
39
40 -class YumDownloadError(YumBaseError):
41 pass
42
43 -class YumTestTransactionError(YumBaseError):
44 pass
45
46 -class YumRPMCheckError(YumBaseError):
47 pass
48
49 -class LockError(YumBaseError):
50 - def __init__(self, errno, msg, pid=0):
51 YumBaseError.__init__(self) 52 self.errno = errno 53 self.msg = msg 54 self.pid = pid
55
56 -class DepError(YumBaseError):
57 pass
58
59 -class RepoError(YumBaseError):
60 pass
61
62 -class DuplicateRepoError(RepoError):
63 pass
64
65 -class NoMoreMirrorsRepoError(RepoError):
66 pass
67
68 -class ConfigError(YumBaseError):
69 pass
70
71 -class MiscError(YumBaseError):
72 pass
73
74 -class GroupsError(YumBaseError):
75 pass
76
77 -class InstallError(YumBaseError):
78 pass
79
80 -class UpdateError(YumBaseError):
81 pass
82
83 -class RemoveError(YumBaseError):
84 pass
85
86 -class ReinstallError(YumBaseError):
87 pass
88
89 -class ReinstallRemoveError(ReinstallError):
90 pass
91
92 -class ReinstallInstallError(ReinstallError):
93 pass
94
95 -class DowngradeError(YumBaseError):
96 pass
97
98 -class RepoMDError(YumBaseError):
99 pass
100
101 -class PackageSackError(YumBaseError):
102 pass
103
104 -class RpmDBError(YumBaseError):
105 pass
106
107 -class CompsException(YumBaseError):
108 pass
109
110 -class MediaError(YumBaseError):
111 pass
112
113 -class PkgTagsError(YumBaseError):
114 pass
115
116 -class YumDeprecationWarning(DeprecationWarning):
117 """ 118 Used to mark a method as deprecated. 119 """
120 - def __init__(self, value=None):
121 DeprecationWarning.__init__(self, value)
122
123 -class YumFutureDeprecationWarning(YumDeprecationWarning):
124 """ 125 Used to mark a method as deprecated. Unlike YumDeprecationWarning, 126 YumFutureDeprecationWarnings will not be shown on the console. 127 """
128 - def __init__(self, value=None):
130