Skip to contentSkip to conversation

runqueue: Drop SystemExit usage

PATCH New Richard Purdie 1 participant 1 message Feb 17, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 runqueue: Drop SystemExit usage

Using bb.fatal for a fatal error message is the best practise, switch the code to match other call sites.

---
 lib/bb/runqueue.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
lib/bb/runqueue.py +1 -2
index ce711b6252..e5bd9311f2 100644
@@ -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
Signature · 1 line
2.37.2