iperf3: Pre-declare some variables set in the loop.

This is a change just to make the linter happy, the code
probably would have run OK without it.

Found by Ruff checking F821.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
pull/714/head
Angus Gratton 2023-08-09 18:54:20 +10:00 zatwierdzone przez Damien George
rodzic c6a72c70b9
commit 991ac986fd
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -380,9 +380,11 @@ def client(host, udp=False, reverse=False, bandwidth=10 * 1024 * 1024):
ticks_us_end = param["time"] * 1000000
poll = select.poll()
poll.register(s_ctrl, select.POLLIN)
buf = None
s_data = None
start = None
udp_packet_id = 0
udp_last_send = None
while True:
for pollable in poll.poll(stats.max_dt_ms()):
if pollable_is_sock(pollable, s_data):