Commit a645db74 authored by Denis Bilenko's avatar Denis Bilenko

sslold: add docstring to wrap_socket

parent 08b5709e
......@@ -175,6 +175,12 @@ def wrap_socket(sock, keyfile=None, certfile=None,
ssl_version=None, ca_certs=None,
do_handshake_on_connect=None,
suppress_ragged_eofs=None):
"""Create a new :class:`SSLObject` instance.
For compatibility with :mod:`gevent.ssl` the function accepts all the arguments that :func:`gevent.ssl.wrap_socket`
accepts. However, it only understands what *sock*, *keyfile* and *certfile* mean, so it will raise
:exc:`ImportError` if you pass anything else.
"""
for arg in ['cert_reqs', 'ssl_version', 'ca_certs', 'do_handshake_on_connect', 'suppress_ragged_eofs']:
if locals()[arg] is not None:
raise TypeError('To use argument %r install ssl package: http://pypi.python.org/pypi/ssl' % arg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment