Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/t/r/trollius-0.2/asyncio/selector_events.py   trollius(Download)
try:
    import ssl
    from .py3_ssl import (
        wrap_ssl_error, SSLContext, BACKPORT_SSL_CONTEXT, SSLWantReadError,
        SSLWantWriteError)
                else:
                    # Python older than 3.4
                    sslcontext = SSLContext(ssl.PROTOCOL_SSLv23)
                    if not BACKPORT_SSL_CONTEXT:
                        sslcontext.options |= ssl.OP_NO_SSLv2

src/t/r/trollius-0.2/asyncio/test_utils.py   trollius(Download)
try:
    import ssl
    from .py3_ssl import SSLContext, wrap_socket
except ImportError:  # pragma: no cover
    # SSL support disabled in Python
def dummy_ssl_context():
    if ssl is None:
        return None
    else:
        return SSLContext(ssl.PROTOCOL_SSLv23)