diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-09 15:06:16 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-09 15:59:44 +0000 |
commit | ceddb5b3d229b83c172656053cd29aeb521fcce0 (patch) | |
tree | acf7c784bc40195594ec493932309d1a2bdea544 | |
parent | e655f9361b9c3b77906b8e06b5cc76bc5180640e (diff) | |
download | bitbake-contrib-ceddb5b3d229b83c172656053cd29aeb521fcce0.tar.gz |
bblayers/action: When adding layers, catch BBHandledException
When adding a layer, parse error can occur, raising BBHandledException.
Catch this and error, aborting the layer add to meet user expectations.
[YOCTO #14054]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bblayers/action.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bblayers/action.py b/lib/bblayers/action.py index 5b78195ad..f05f5d330 100644 --- a/lib/bblayers/action.py +++ b/lib/bblayers/action.py @@ -50,10 +50,10 @@ class ActionPlugin(LayerPlugin): if not (args.force or notadded): try: self.tinfoil.run_command('parseConfiguration') - except bb.tinfoil.TinfoilUIException: + except (bb.tinfoil.TinfoilUIException, bb.BBHandledException): # Restore the back up copy of bblayers.conf shutil.copy2(backup, bblayers_conf) - bb.fatal("Parse failure with the specified layer added") + bb.fatal("Parse failure with the specified layer added, aborting.") else: for item in notadded: sys.stderr.write("Specified layer %s is already in BBLAYERS\n" % item) |