def replace_default_installer(installer_name, default_installer_name):
    """Replace the default installer keyword.

    :returns: ``default_installer_name`` if ``installer_name`` is
        'default_installer', else ``installer_name``
    :raises ValueError: if ``default_installer_name`` is None and
        ``installer_name`` is ``default_installer``
    """
    if installer_name == 'default_installer':
        if default_installer_name:
            return default_installer_name
        else:
            raise ValueError(
                "Trying to replace default installer where default installer "
                "is not allowed")
    else:
        return installer_name