diff options
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r-- | ipalib/errors.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py index cf213d70f..6f0941e20 100644 --- a/ipalib/errors.py +++ b/ipalib/errors.py @@ -129,11 +129,15 @@ class ValidationError(IPAError): class ConversionError(ValidationError): - def __init__(self, name, value, type_, position): - self.type = type_ - self.position = position - ValidationError.__init__(self, name, value, type_.conversion_error) + """ + Raised when a value cannot be converted to the correct type. + """ + def __init__(self, name, value, type_, index=None): + self.type = type_ + ValidationError.__init__(self, name, value, type_.conversion_error, + index=index, + ) class NormalizationError(ValidationError): |