From be8ddaed17dd4440ac66df06f3c84c572672339f Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 10 Aug 2022 13:42:51 +0100 Subject: bitbake: BBHandler: Allow earlier exit for classes not found Rather than relying on later code to error if the class isn't found, exit earlier and more clearly from a code perspective. (Bitbake rev: f7c55c8147329670fd5bc55b1ae3f47f25b89bab) Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/parse_py/BBHandler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index 68415735fd..532a4e08f1 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py @@ -56,6 +56,9 @@ def inherit(files, fn, lineno, d): if abs_fn: file = abs_fn + if not os.path.exists(file): + raise ParseError("Could not inherit file %s" % (file), fn, lineno) + if not file in __inherit_cache: logger.debug("Inheriting %s (from %s:%d)" % (file, fn, lineno)) __inherit_cache.append( file ) -- cgit v1.2.3-54-g00ecf