Skip to content

Commit

Permalink
Moved ssl import to top-level for stream and used safe_import to give…
Browse files Browse the repository at this point in the history
… similar behavior
  • Loading branch information
comrumino committed Jul 2, 2022
1 parent aea6059 commit 8ee00cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpyc/core/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
win32file = safe_import("win32file")
win32pipe = safe_import("win32pipe")
win32event = safe_import("win32event")
ssl = safe_import("ssl")


retry_errnos = (errno.EAGAIN, errno.EWOULDBLOCK)
Expand Down Expand Up @@ -206,7 +207,6 @@ def ssl_connect(cls, host, port, ssl_kwargs, **kwargs):
:returns: a :class:`SocketStream`
"""
import ssl
if kwargs.pop("ipv6", False):
kwargs["family"] = socket.AF_INET6
s = cls._connect(host, port, **kwargs)
Expand Down

0 comments on commit 8ee00cd

Please sign in to comment.