Skip to content

Commit 3771f5f

Browse files
committed
Fixed couple typing errors.
1 parent ad3c79b commit 3771f5f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

examples/tcp_echo_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@ def cli(
225225
local_ip_address=ip4_host.address if ip4_host else Ip4Address(),
226226
remote_ip_address=remote_ip_address,
227227
)
228+
case _:
229+
raise ValueError(
230+
f"Unsupported IP address version: {remote_ip_address.version!r}."
231+
)
228232

229233
try:
230234
stack.start()

examples/udp_echo_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ def cli(
206206
local_ip_address=ip4_host.address if ip4_host else Ip4Address(),
207207
remote_ip_address=remote_ip_address,
208208
)
209+
case _:
210+
raise ValueError(
211+
f"Invalid remote IP address version: {remote_ip_address.version}"
212+
)
209213

210214
try:
211215
stack.start()

0 commit comments

Comments
 (0)