def _find_line(string, file_name):
    """
    find the first occurence of a string in a file
    """
    
    with open(file_name, 'r') as fi:
        for line in fi:
            if string in line:
                return line