From 991ac986fd45781f99e9de36fefdc5c4838b99f0 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 9 Aug 2023 18:54:20 +1000 Subject: [PATCH] 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 --- python-ecosys/iperf3/iperf3.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-ecosys/iperf3/iperf3.py b/python-ecosys/iperf3/iperf3.py index 62ee016..a5c5444 100644 --- a/python-ecosys/iperf3/iperf3.py +++ b/python-ecosys/iperf3/iperf3.py @@ -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):