summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-09 17:39:20 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-10 13:37:56 +0100
commit20397f8d4b399e27268bb6f29be01739beb95b5f (patch)
tree67c20f7e9da207d690ad0618e1700acdce73ecc8 /bitbake
parente3cab68b9ae5c4f1db1b955211cbb27da2e5d521 (diff)
downloadpoky-20397f8d4b399e27268bb6f29be01739beb95b5f.tar.gz
bitbake: command: Ensure exceptions inheriting from BBHandledException are visible
Previous changes allowed BBHandledException to be detected but not exceptions which inherit from it. Fix this. The code really needs totally reworking to preserve the exceptions. [YOCTO #14054] (Bitbake rev: ef762d92df6c2554c6248e80212f984d9ec4c651) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/command.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index f8c6a03bb9..dd77cdd6e2 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -81,8 +81,12 @@ class Command:
81 result = command_method(self, commandline) 81 result = command_method(self, commandline)
82 except CommandError as exc: 82 except CommandError as exc:
83 return None, exc.args[0] 83 return None, exc.args[0]
84 except (Exception, SystemExit): 84 except (Exception, SystemExit) as exc:
85 import traceback 85 import traceback
86 if isinstance(exc, bb.BBHandledException):
87 # We need to start returning real exceptions here. Until we do, we can't
88 # tell if an exception is an instance of bb.BBHandledException
89 return None, "bb.BBHandledException()\n" + traceback.format_exc()
86 return None, traceback.format_exc() 90 return None, traceback.format_exc()
87 else: 91 else:
88 return result, None 92 return result, None