diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-10 13:42:51 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-12 11:49:29 +0100 |
commit | be8ddaed17dd4440ac66df06f3c84c572672339f (patch) | |
tree | b9f0f0823632d5f2f4403e1b7a691d8ea8e80dbc /bitbake/lib/bb/parse/parse_py/BBHandler.py | |
parent | 8a1afec0d592db6f02338d0991e7ede250b53f8e (diff) | |
download | poky-be8ddaed17dd4440ac66df06f3c84c572672339f.tar.gz |
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>
Diffstat (limited to 'bitbake/lib/bb/parse/parse_py/BBHandler.py')
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/BBHandler.py | 3 |
1 files changed, 3 insertions, 0 deletions
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): | |||
56 | if abs_fn: | 56 | if abs_fn: |
57 | file = abs_fn | 57 | file = abs_fn |
58 | 58 | ||
59 | if not os.path.exists(file): | ||
60 | raise ParseError("Could not inherit file %s" % (file), fn, lineno) | ||
61 | |||
59 | if not file in __inherit_cache: | 62 | if not file in __inherit_cache: |
60 | logger.debug("Inheriting %s (from %s:%d)" % (file, fn, lineno)) | 63 | logger.debug("Inheriting %s (from %s:%d)" % (file, fn, lineno)) |
61 | __inherit_cache.append( file ) | 64 | __inherit_cache.append( file ) |