summaryrefslogtreecommitdiffstats
path: root/ipalib/errors.py
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2008-12-17 17:17:02 -0700
committerJason Gerard DeRose <jderose@redhat.com>2008-12-17 17:17:02 -0700
commitf0bbe1b5a09e1e2fc33d662c4775203f594af416 (patch)
tree5899034c28efb69f7ac979d995ee4582829849e5 /ipalib/errors.py
parente1aa5539fce070ef0b382074ebb7d1519bc6bf3f (diff)
downloadfreeipa-f0bbe1b5a09e1e2fc33d662c4775203f594af416.tar.gz
freeipa-f0bbe1b5a09e1e2fc33d662c4775203f594af416.tar.xz
freeipa-f0bbe1b5a09e1e2fc33d662c4775203f594af416.zip
Add body for the NameSpaceError exception
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r--ipalib/errors.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py
index 25f594f2..d8591304 100644
--- a/ipalib/errors.py
+++ b/ipalib/errors.py
@@ -231,8 +231,19 @@ class RegistrationError(IPAError):
class NameSpaceError(RegistrationError):
+ """
+ Raised when name is not a valid Python identifier for use for use as
+ the name of NameSpace member.
+ """
msg = 'name %r does not re.match %r'
+ def __init__(self, name, regex):
+ self.name = name
+ self.regex = regex
+
+ def __str__(self):
+ return self.msg % (self.name, self.regex)
+
class SubclassError(RegistrationError):
"""