summaryrefslogtreecommitdiffstats
path: root/ipalib/errors.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r--ipalib/errors.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py
index de9a43a5..9f40ddae 100644
--- a/ipalib/errors.py
+++ b/ipalib/errors.py
@@ -145,8 +145,9 @@ class RuleError(ValidationError):
Raised when a value fails a validation rule.
"""
def __init__(self, name, value, error, rule, index=None):
- self.rule_name = rule.__name__
- ValidationError.__init__(self, name, value, error, index)
+ assert callable(rule)
+ self.rule = rule
+ ValidationError.__init__(self, name, value, error, index=index)
class RequirementError(ValidationError):
@@ -233,6 +234,5 @@ class MissingOverrideError(RegistrationError):
return self.msg % (self.base.__name__, self.cls.__name__, self.cls)
-
class TwiceSetError(IPAError):
msg = '%s.%s cannot be set twice'