def locales(names):
    """
    Require the list of locales to be available.

    Raises UnsupportedLocales if some of the required locales
    are not supported.
    """

    family = distrib_family()
    if family == 'debian':
        command = 'dpkg-reconfigure --frontend=noninteractive locales'
        if distrib_id() == 'Ubuntu':
            config_file = '/var/lib/locales/supported.d/local'
            if not is_file(config_file):
                run_as_root('touch %s' % config_file)
        else:
            config_file = '/etc/locale.gen'
        _locales_generic(names, config_file=config_file, command=command)
    elif ['arch', 'gentoo'] in family:
        _locales_generic(names, config_file='/etc/locale.gen', command='locale-gen')
    elif distrib_family() == 'redhat':
        _locales_redhat(names)
    else:
        raise UnsupportedFamily(supported=['debian', 'arch', 'gentoo', 'redhat'])
dataset/ETHPy150Open ronnix/fabtools/fabtools/require/system.py/locales/swapped operands of `in`