def add_find_program_override(self, name, exe):
    if (name in self.build.searched_programs):
        raise InterpreterException(('Tried to override finding of executable "%s" which has already been found.' % name))
    if (name in self.build.find_overrides):
        raise InterpreterException(('Tried to override executable "%s" which has already been overridden.' % name))
    self.build.find_overrides[name] = exe
def add_find_program_override(self, name, exe):
    if (name in self.build.searched_programs):
        raise InterpreterException(('Tried to override finding of executable "%s" which has already been found.' % name))
    if (name in self.build.find_overrides):
        raise InterpreterException(('Tried to override executable "%s" which has already been overridden.' % name))
    self.build.find_overrides[name] = exe