From 3f16d0acf93bbe8da7690f209782783ae8afb1c6 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 17 Sep 2009 22:58:26 -0700 Subject: bugfix: exclude disabled children from consideration in valid condition --- grc/base/Element.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'grc') diff --git a/grc/base/Element.py b/grc/base/Element.py index e77e7ce08..a57090f3b 100644 --- a/grc/base/Element.py +++ b/grc/base/Element.py @@ -50,11 +50,12 @@ class Element(object): def get_error_messages(self): """ Get the list of error messages from this element and all of its children. + Do not include the error messages from disabled children. Cleverly indent the children error messages for printing purposes. @return a list of error message strings """ error_messages = list(self._error_messages) #make a copy - for child in self.get_children(): + for child in filter(lambda c: c.get_enabled(), self.get_children()): for msg in child.get_error_messages(): error_messages.append("%s:\n\t%s"%(child, msg.replace("\n", "\n\t"))) return error_messages -- cgit