'Execute all the vectors and return the first result matching the given condition.
Return the name and the result of the first vector execution response that satisfy
the given condition.
With unspecified names, execute all the vectors. Optionally store results.
Exceptions triggered checking condition function are catched and logged.
Args:
names (list of str): The list of names of vectors to execute.
format_args (dict): The arguments dictionary used to format the vectors with.
condition (function): The function or lambda to check certain conditions on result.
Must returns boolean.
store_result (bool): Store as result.
store_name (str): Store the found vector name in the specified argument.
Returns:
Tuple. Contains the vector name and execution result in the
`( vector_name, result )` form.'

def find_first_result(self, names=[], format_args={}, condition=None, store_result=False, store_name=''):

    if (not callable(condition)):
        raise DevException(messages.vectors.wrong_condition_type)
    if (not isinstance(store_name, str)):
        raise DevException(messages.vectors.wrong_store_name_type)
    for vector in self:
        if (not self._os_match(vector.target)):
            continue
        names = [n for n in names if n]
        if (names and (not any(((n in vector.name) for n in names)))):
            continue
        format_args['current_vector'] = vector.name
        result = vector.run(format_args)
        try:
            condition_result = condition(result)
        except Exception as e:
            import traceback
            log.info(traceback.format_exc())
            log.debug((messages.vectorlist.vector_s_triggers_an_exc % vector.name))
            condition_result = False
        if condition_result:
            if store_result:
                self.session[self.module_name]['results'][vector.name] = result
            if store_name:
                self.session[self.module_name]['stored_args'][store_name] = vector.name
            return (vector.name, result)
    return (None, None)
