Add body for the NameSpaceError exception

This commit is contained in:
Jakub Hrozek
2008-12-17 17:17:02 -07:00
committed by Jason Gerard DeRose
parent e1aa5539fc
commit f0bbe1b5a0

View File

@@ -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):
"""