diff --git a/src/registry.py b/src/registry.py index 02289357a..b60c9c1c2 100644 --- a/src/registry.py +++ b/src/registry.py @@ -307,8 +307,10 @@ class Value(Group): if setDefault: self.setValue(default) - def error(self): - if self.__doc__: + def error(self, message=None): + if message: + s = message + elif self.__doc__: s = self.__doc__ else: s = """%s has no docstring. If you're getting this message, @@ -539,7 +541,7 @@ class Regexp(Value): self.__parent.__init__(*args, **kwargs) def error(self, e): - self.__parent.error('Value must be a regexp of the form %s' % e) + self.__parent.error('%s' % e) def set(self, s): try: