def _get_config_data(fqdn):
    """Get configuration section for the chosen host, and CLI host parameters."""
    # Without the patch applied, fall back to ugly hacks
    if not upload.extended_info:
        try:
            caller = sys._getframe(2) # pylint: disable=protected-access
        except __HOLE__:
            pass # somehow not CPython
        else:
            config = caller.f_globals.get("config")
            host = caller.f_locals.get("host")
            del caller
            if config and host:
                upload.extended_info = dict(config=config, host=host)

    if upload.extended_info:
        host_config = dict(upload.extended_info["config"].items(upload.extended_info["host"]))
        host_argument = host_config.get(upload.extended_info["host"], "")
    else:
        host_config = {}
        host_argument = _get_host_argument(fqdn)
        log("WARN: Extended host configuration not available!")

    # Parse "host:key=val;..." argument from command line into a dict
    cli_params = dict(cgi.parse_qsl(host_argument.replace(',', ';'), keep_blank_values=True))

    return host_config, cli_params
dataset/ETHPy150Open jhermann/artifactory-debian/dput-webdav/webdav.py/_get_config_data