]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-132307: Remove unnecessary check in `asyncio/base_events.py` (#132324)
authorStan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Thu, 10 Apr 2025 15:41:32 +0000 (16:41 +0100)
committerGitHub <noreply@github.com>
Thu, 10 Apr 2025 15:41:32 +0000 (15:41 +0000)
Lib/asyncio/base_events.py

index ff63639638c13fd550f1f5192164ffe256e3be55..7b4e92aed682d5dd5f00ce4cad54f7ec8c52c942 100644 (file)
@@ -1666,8 +1666,7 @@ class BaseEventLoop(events.AbstractEventLoop):
             raise ValueError(
                 'ssl_shutdown_timeout is only meaningful with ssl')
 
-        if sock is not None:
-            _check_ssl_socket(sock)
+        _check_ssl_socket(sock)
 
         transport, protocol = await self._create_connection_transport(
             sock, protocol_factory, ssl, '', server_side=True,