From cc5cec6cd21c3b7e17810cf7e9c2352913580bb0 Mon Sep 17 00:00:00 2001 From: Dmytro Bogovych Date: Mon, 11 Sep 2023 12:21:33 +0300 Subject: [PATCH] - fix global variable access --- src/utils_qualtest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils_qualtest.py b/src/utils_qualtest.py index 8680814..03fce30 100644 --- a/src/utils_qualtest.py +++ b/src/utils_qualtest.py @@ -58,6 +58,7 @@ TRACE_TOTAL_TIMEOUT = 30 # a webpage is mostly I/O bound, it's not going to be significant. def trace_function(frame, event, arg): + global TRACE_START_TIME if time.time() - TRACE_START_TIME > TRACE_TOTAL_TIMEOUT: raise Exception('Timed out!') # Use whatever exception you consider appropriate. @@ -114,6 +115,7 @@ class QualtestBackend: def upload_audio(self, probe_id, path_recorded: Path): + global TRACE_START_TIME result = False # Log about upload attempt