DEFAULT_CONFIG = {
    "protocol": "json",
    "timeout": 2,
    "strict": True
}


def scrub_output(context, whitelist, strict=True):
    r = context.get("response", None)
    if r is None:
        context["response"] = {}
        return
    if not strict:
        return
    context["response"] = {r[k] for k in whitelist}

DEFAULT_CONFIG = {
    "protocol": "json",
    "timeout": 2,
    "strict": True
}


def scrub_output(context, whitelist, strict=True):
    r = context.get("response", None)
    if r is None:
        context["response"] = {}
        return
    if not strict:
        return
    context["response"] = {k: r[k] for k in whitelist}

Fix bug in scrub_output where response was creating set, not dict
Fix bug in scrub_output where response was creating set, not dict
