mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
New Param: implemented a base Param._convert_scalar() method; added Param.type_error attribute for ConversionError message
This commit is contained in:
@@ -481,9 +481,17 @@ class RequirementError(InvocationError):
|
||||
class ConversionError(InvocationError):
|
||||
"""
|
||||
**3006** Raised when parameter value can't be converted to correct type.
|
||||
|
||||
For example:
|
||||
|
||||
>>> raise ConversionError(name='age', error='must be an integer')
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
ConversionError: invalid 'age': must be an integer
|
||||
"""
|
||||
|
||||
errno = 3006
|
||||
format = _('invalid %(name)r: %(error)s')
|
||||
|
||||
|
||||
class ValidationError(InvocationError):
|
||||
|
||||
Reference in New Issue
Block a user