Note: While addressing warnings on the autobuilder, we encountered relevant warnings where attempts were made to terminate processes that were not running.
To enhance visibility, we have opted to catch the ProcessLookupError exception and log a warning in the console rather than suppressing it. Signed-off-by: Alassane Yattara <[email protected]> --- lib/toaster/tests/commands/test_runbuilds.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/toaster/tests/commands/test_runbuilds.py b/lib/toaster/tests/commands/test_runbuilds.py index 738d36e9..849c227e 100644 --- a/lib/toaster/tests/commands/test_runbuilds.py +++ b/lib/toaster/tests/commands/test_runbuilds.py @@ -22,8 +22,6 @@ import signal import logging -logger = logging.getLogger("toaster") - class KillRunbuilds(threading.Thread): """ Kill the runbuilds process after an amount of time """ def __init__(self, *args, **kwargs): @@ -43,7 +41,7 @@ class KillRunbuilds(threading.Thread): pid = pidfile.read() os.kill(int(pid), signal.SIGTERM) except ProcessLookupError: - logger.warning("Runbuilds not running or already killed") + logging.warning("Runbuilds not running or already killed") class TestCommands(TestCase): -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#6082): https://lists.yoctoproject.org/g/toaster/message/6082 Mute This Topic: https://lists.yoctoproject.org/mt/103130075/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/toaster/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
