__init__.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:aws-cfn-plex 作者: lordmuffin 项目源码 文件源码
def _backend_import_fallback(backends):
    # If backends already exist just return them. This branch is here
    # to get full line coverage from our tests.
    if backends:
        return backends

    # if iter_entry_points fails to find any backends then manually try to
    # import our current backends as a workaround for issues with application
    # bundlers like pyinstaller, cx_freeze, etc

    # OpenSSL is guaranteed to be present until we unbundle the backends.
    from cryptography.hazmat.backends.openssl.backend import backend as be_ossl
    backends = [be_ossl]
    try:
        from cryptography.hazmat.backends.commoncrypto.backend import (
            backend as be_cc
        )
    except ImportError:
        pass
    else:
        backends.append(be_cc)

    return backends
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号