diff mbox series

runqueue: Drop SystemExit usage

Message ID 20230217151844.351586-1-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit c27e48fa81c2327a4a355a028884ab457cde3ae7
Headers show
Series runqueue: Drop SystemExit usage | expand

Commit Message

Richard Purdie Feb. 17, 2023, 3:18 p.m. UTC
Using bb.fatal for a fatal error message is the best practise, switch
the code to match other call sites.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/bb/runqueue.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index ce711b6252..e5bd9311f2 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -1941,8 +1941,7 @@  class RunQueueExecute:
                 try:
                     module = __import__(modname, fromlist=(name,))
                 except ImportError as exc:
-                    logger.critical("Unable to import scheduler '%s' from '%s': %s" % (name, modname, exc))
-                    raise SystemExit(1)
+                    bb.fatal("Unable to import scheduler '%s' from '%s': %s" % (name, modname, exc))
                 else:
                     schedulers.add(getattr(module, name))
         return schedulers