def set_main(key, value, path=MAIN_CF):
    '''
    Set a single config value in the main.cf file. If the value does not already
    exist, it will be appended to the end.

    CLI Example:

        salt <minion> postfix.set_main mailq_path /usr/bin/mailq
    '''
    pairs, conf_list = _parse_main(path)

    new_conf = []
    if pairs in key:
        for line in conf_list:
            if line.startswith(key):
                new_conf.append('{0} = {1}'.format(key, value))
            else:
                new_conf.append(line)
    else:
        conf_list.append('{0} = {1}'.format(key, value))
        new_conf = conf_list

    _write_conf(new_conf, path)
    return new_conf
dataset/ETHPy150Open saltstack/salt/salt/modules/postfix.py/set_main/swapped operands of `in`