def config_line(setting, value):
    """
    Generate a single configuration line based on the setting and value

    Parameters
    ----------
    setting : str
        The configuration setting

    value : str
        The value for the configuration setting

    Returns
    -------
    str
        The configuration line based on the setting and value
    """
    if setting in [
        'appendfilename', 'dbfilename', 'dbdir', 'dir', 'pidfile', 'unixsocket'
    ]:
        value = repr(value)
    return '{setting} {value}'.format(setting=setting, value=value)