commit mtughan's bugfix for this bug:

https://sourceforge.net/tracker/?func=detail&aid=2985241&group_id=58965&atid=489447
This commit is contained in:
Daniel Folkinshteyn 2010-04-11 00:42:55 -04:00 committed by Valentin Lorentz
parent c0986e1122
commit 4cd0d19be7

View File

@ -311,8 +311,10 @@ class Value(Group):
if setDefault: if setDefault:
self.setValue(default) self.setValue(default)
def error(self): def error(self, message=None):
if self.__doc__: if message:
s = message
elif self.__doc__:
s = self.__doc__ s = self.__doc__
else: else:
s = """%s has no docstring. If you're getting this message, s = """%s has no docstring. If you're getting this message,
@ -543,10 +545,7 @@ class Regexp(Value):
self.__parent.__init__(*args, **kwargs) self.__parent.__init__(*args, **kwargs)
def error(self, e): def error(self, e):
s = 'Value must be a regexp of the form m/.../ or /.../. %s' % e self.__parent.error('%s' % e)
e = InvalidRegistryValue(s)
e.value = self
raise e
def set(self, s): def set(self, s):
try: try: