From 854bed10dfb61e9f9feab5259a75e809941089ab Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 26 Aug 2009 11:23:23 -0700 Subject: Added virtual sink and logic to clone port. Tweaks to the base validation routines. Validate twice in the update until rewrite functions are implemented. --- grc/base/Block.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'grc/base/Block.py') diff --git a/grc/base/Block.py b/grc/base/Block.py index 349e71f76..491c594cc 100644 --- a/grc/base/Block.py +++ b/grc/base/Block.py @@ -145,13 +145,12 @@ class Block(Element): Validate the block. All ports and params must be valid. All checks must evaluate to true. + Validate the params, ports, and the connections to this block. """ Element.validate(self) for c in self.get_params() + self.get_ports() + self.get_connections(): - try: - c.validate() - assert c.is_valid() - except AssertionError: + c.validate() + if not c.is_valid(): for msg in c.get_error_messages(): self.add_error_message('>>> %s:\n\t%s'%(c, msg)) -- cgit