142: python2.4: Fixed custom exceptions in errors.py as exceptions in Python2.4 are not new-style classes

This commit is contained in:
Jason Gerard DeRose 2008-08-13 04:11:26 +00:00
parent c9072183a6
commit 47fed6c4c2

View File

@ -52,13 +52,13 @@ class ValidationError(IPAError):
self.name = name
self.value = value
self.error = error
super(ValidationError, self).__init__(name, value, error)
IPAError.__init__(self, name, value, error)
class NormalizationError(ValidationError):
def __init__(self, name, value, type):
self.type = type
super(NormalizationError, self).__init__(name, value,
ValidationError.__init__(self, name, value,
'not %r' % type
)
@ -66,7 +66,7 @@ class NormalizationError(ValidationError):
class RuleError(ValidationError):
def __init__(self, name, value, rule, error):
self.rule = rule
super(RuleError, self).__init__(name, value, error)
ValidationError.__init__(self, name, value, error)