From cbcca144813661a00178611222ec7cbf263592fe Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sat, 5 Aug 2023 13:36:36 +0100 Subject: [PATCH] rename until_stopped() to wait_until_stopped() --- vban_cmd/worker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vban_cmd/worker.py b/vban_cmd/worker.py index 4d45e0a..6840222 100644 --- a/vban_cmd/worker.py +++ b/vban_cmd/worker.py @@ -31,7 +31,7 @@ class Subscriber(threading.Thread): self.packet.framecounter = ( int.from_bytes(self.packet.framecounter, "little") + 1 ).to_bytes(4, "little") - self.until_stopped(10) + self.wait_until_stopped(10) except socket.gaierror as e: self.logger.exception(f"{type(e).__name__}: {e}") raise VBANCMDConnectionError( @@ -42,7 +42,7 @@ class Subscriber(threading.Thread): def stopped(self): return self.stop_event.is_set() - def until_stopped(self, timeout, period=0.2): + def wait_until_stopped(self, timeout, period=0.2): must_end = time.time() + timeout while time.time() < must_end: if self.stopped():