Added virtual sink and logic to clone port.
[debian/gnuradio] / grc / base / FlowGraph.py
index ea489e948679b6106d9ea4d85b75534ca2627e0a..fe493cce1f39a2918e1e150270fe3a26cb523c1e 100644 (file)
@@ -150,14 +150,14 @@ class FlowGraph(Element):
        def validate(self):
                """
                Validate the flow graph.
-               All connections and blocks must be valid.
+               Validate only the blocks.
+               Connections will be validated within the blocks.
                """
                Element.validate(self)
-               for c in self.get_elements():
-                       try:
-                               c.validate()
-                               assert c.is_valid()
-                       except AssertionError: self.add_error_message('Element "%s" is not valid.'%c)
+               for c in self.get_blocks():
+                       c.validate()
+                       if not c.is_valid():
+                               self.add_error_message('Element "%s" is not valid.'%c)
 
        ##############################################
        ## Import/Export Methods