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 <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2022-08-10 13:42:51 +01:00
parent 8a1afec0d5
commit be8ddaed17

View File

@@ -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 )