def __process_case_list(list_input, list_output):
    """
        Process a case list and raise an exception in case of duplicate
        entries.
    """
    duplicate = ""

    for item in list_input:
        if item is None or item == "":
            continue
        elif item.lower() in list_output:
            duplicate = item
            break
        else:
            list_output.append(item.lower())

    if duplicate != "":
        raise Exception("Duplicate config file entries. The same string "
                        "must not exist in multiple config files. The "
                        "duplicate string was \"%s\" (without the "
                        "enclosing quotes)." % duplicate)

    return list_output