From f24bc7092f5ff56558053d0c7d26c2a1a38848b6 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 13 Jun 2026 20:22:20 +0200 Subject: [PATCH] test(io): fix UnboundLocalError The `if response` check a few rows down would not actually work without initializing the variable first. It'd throw: ``` E UnboundLocalError: cannot access local variable 'response' where it is not associated with a value ``` --- test/io/postgrest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/io/postgrest.py b/test/io/postgrest.py index 65431035c..3128d7b25 100644 --- a/test/io/postgrest.py +++ b/test/io/postgrest.py @@ -250,6 +250,8 @@ def wait_until_status_code(url, max_seconds, status_code): "Wait for the given HTTP endpoint to return a status code" session = requests_unixsocket.Session() + response = None + for _ in range(max_seconds * 10): try: response = session.get(url, timeout=1)