

def resolve_cert_reqs(candidate):
    "\n    Resolves the argument to a numeric constant, which can be passed to\n    the wrap_socket function/method from the ssl module.\n    Defaults to :data:`ssl.CERT_NONE`.\n    If given a string it is assumed to be the name of the constant in the\n    :mod:`ssl` module or its abbrevation.\n    (So you can specify `REQUIRED` instead of `CERT_REQUIRED`.\n    If it's neither `None` nor a string we assume it is already the numeric\n    constant which can directly be passed to wrap_socket.\n    "
    if (candidate is None):
        return CERT_NONE
    if isinstance(candidate, str):
        res = getattr(ssl, res, None)
        if (res is None):
            res = getattr(ssl, ('CERT_' + candidate))
        return res
    return candidate

dataset/ETHPy150Open Bolton-and-Menk-GIS/restapi/restapi/requests/packages/urllib3/util.py resolve_cert_reqs/VarMisuse@41/247 `candidate`->`res`