Skip to content

Commit 991ac98

Browse files
projectgusdpgeorge
authored andcommitted
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 <[email protected]>
1 parent c6a72c7 commit 991ac98

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python-ecosys/iperf3/iperf3.py

+2
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,11 @@ def client(host, udp=False, reverse=False, bandwidth=10 * 1024 * 1024):
380380
ticks_us_end = param["time"] * 1000000
381381
poll = select.poll()
382382
poll.register(s_ctrl, select.POLLIN)
383+
buf = None
383384
s_data = None
384385
start = None
385386
udp_packet_id = 0
387+
udp_last_send = None
386388
while True:
387389
for pollable in poll.poll(stats.max_dt_ms()):
388390
if pollable_is_sock(pollable, s_data):

0 commit comments

Comments
 (0)