(self)
Tries to execute the graph, if some block is tainted it prevents
        the execution, if not it starts running the backend.
Tries to execute the graph, if some block is tainted it prevents
        the execution, if not it starts running the backend.
Tries to execute the graph if some block is tainted it prevents the execution if not it starts running the backend .
def execute_graph(self):
        """ Tries to execute the graph, if some block is tainted it prevents
        the execution, if not it starts running the backend. """
        logger.debug('Checking taint')
        # Check if any block is tainted
        if any(map(lambda block: block.tainted, self.block_div.children)):
            # Get tainted block
            tainted_block = reduce(lambda l, r: l if l.tainted else r,
                                   self.block_div.children)
            logger.debug('Some block is tainted')
            Notification(title='Warning',
                         message=tainted_block.tainted_msg).open()
            self.parent.on_graph_executed()
        else:
            logger.debug('No block is tainted')
            for block in self.block_div.children:
                if block.kindled:
                    block.unkindle()
            self.backend.exec_graph(self.to_ir())
def execute_graph ( self ) : logger . debug ( 'Checking taint' ) # Check if any block is tainted if any ( map ( lambda block : block . tainted , self . block_div . children ) ) : # Get tainted block tainted_block = reduce ( lambda l , r : l if l . tainted else r , self . block_div . children ) logger . debug ( 'Some block is tainted' ) Notification ( title = 'Warning' , message = tainted_block . tainted_msg ) . open ( ) self . parent . on_graph_executed ( ) else : logger . debug ( 'No block is tainted' ) for block in self . block_div . children : if block . kindled : block . unkindle ( ) self . backend . exec_graph ( self . to_ir ( ) )