(self, path)
return self.should_take_exit(path.addr_trace[-2], path.addr_trace[-1])
Given a path, returns True if the path should be kept, False if it should be cut.
Given a path, returns True if the path should be kept, False if it should be cut.
Given a path returns True if the path should be kept False if it should be cut .
def keep_path(self, path):
        """
        Given a path, returns True if the path should be kept, False if it should be cut.
        """
        if len(path.addr_trace) < 2:
            return True

        return self.should_take_exit(path.addr_trace[-2], path.addr_trace[-1])
def keep_path ( self , path ) : if len ( path . addr_trace ) < 2 : return True return self . should_take_exit ( path . addr_trace [ - 2 ] , path . addr_trace [ - 1 ] )