From 4454ffb85200c0e353b7e44569d40dd0036abbdf Mon Sep 17 00:00:00 2001 From: "bodong.yang" Date: Fri, 21 Jun 2024 08:08:36 +0000 Subject: [PATCH] minor fix to retry_task_map --- src/otaclient_common/retry_task_map.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/otaclient_common/retry_task_map.py b/src/otaclient_common/retry_task_map.py index fae77b0e9..a08b7558f 100644 --- a/src/otaclient_common/retry_task_map.py +++ b/src/otaclient_common/retry_task_map.py @@ -189,7 +189,7 @@ def ensure_tasks( ).start() # ------ ensure all tasks are finished ------ # - while self._total_task_num != 0 and self._finished_task == self._total_task_num: + while self._total_task_num == 0 or self._finished_task != self._total_task_num: # shutdown by upper caller or interpreter exits if self._shutdown or _retry_task_map_global_shutdown: _err_msg = f"failed to ensure all tasks, {self._finished_task=}, {self._total_task_num=}"