summaryrefslogtreecommitdiff
path: root/dns
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2023-01-12 14:00:52 -0800
committerBob Halley <halley@dnspython.org>2023-01-12 14:00:52 -0800
commitc2bdb14ee486fe402196c4cbe41534b10b2bd4fd (patch)
tree2e2b984f993b2627cc551f5d70cc069cdc6d0d81 /dns
parent24f0687ebbfc7499d32f47810c6fac2b9b87a63b (diff)
downloaddnspython-c2bdb14ee486fe402196c4cbe41534b10b2bd4fd.tar.gz
Make Coverity happier [#882].
Diffstat (limited to 'dns')
-rw-r--r--dns/_asyncio_backend.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/dns/_asyncio_backend.py b/dns/_asyncio_backend.py
index d825765..82a0624 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],