From: Bob Halley Date: Thu, 12 Jan 2023 22:00:52 +0000 (-0800) Subject: Make Coverity happier [#882]. X-Git-Tag: v2.4.0rc1~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2bdb14ee486fe402196c4cbe41534b10b2bd4fd;p=thirdparty%2Fdnspython.git Make Coverity happier [#882]. --- diff --git a/dns/_asyncio_backend.py b/dns/_asyncio_backend.py index d8257658..82a06249 100644 --- a/dns/_asyncio_backend.py +++ b/dns/_asyncio_backend.py @@ -145,6 +145,10 @@ class Backend(dns._asyncbackend.Backend): ) return DatagramSocket(af, transport, protocol) elif socktype == socket.SOCK_STREAM: + if destination is None: + # This shouldn't happen, but we check to make code analysis software + # happier. + raise ValueError("destination required for stream sockets") (r, w) = await _maybe_wait_for( asyncio.open_connection( destination[0],