From ef8bd817e8b62ede76aa7501a9a8d69af7408efc Mon Sep 17 00:00:00 2001 From: James Vega Date: Sun, 11 Apr 2010 10:15:39 -0400 Subject: [PATCH] Make registry.Regexp.error mimic registry.Value.error Regexp.error can't directly call Value.error because it's providing extra information, so it needs to build the InvalidRegistryValue exception itself and raise it. Closes: Sf#2985241 Signed-off-by: James Vega --- src/registry.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/registry.py b/src/registry.py index 02289357a..5bd5b09b1 100644 --- a/src/registry.py +++ b/src/registry.py @@ -539,7 +539,10 @@ 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) + s = 'Value must be a regexp of the form m/.../ or /.../. %s' % e + e = InvalidRegistryValue(s) + e.value = self + raise e def set(self, s): try: