Skip to content

Commit

Permalink
Make Coverity happier [#882].
Browse files Browse the repository at this point in the history
(cherry picked from commit c2bdb14)
  • Loading branch information
rthalley committed Jan 13, 2023
1 parent eaa3428 commit ba069ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dns/_asyncio_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ async def make_socket(
)
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],
Expand Down

0 comments on commit ba069ce

Please sign in to comment.