summaryrefslogtreecommitdiffstats
path: root/bin/bitbake
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-04-28 14:27:34 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-28 17:48:18 +0100
commitc8e2a40c4e9865ebef9936d23644f2602a5c90f5 (patch)
tree7add3c9b290083ad89effe32c71e2c25e2182bb4 /bin/bitbake
parent56cddeb9e1e4d249f84ccd6ef65db245636e38ea (diff)
downloadbitbake-contrib-c8e2a40c4e9865ebef9936d23644f2602a5c90f5.tar.gz
bitbake-contrib-c8e2a40c4e9865ebef9936d23644f2602a5c90f5.tar.bz2
bitbake-contrib-c8e2a40c4e9865ebef9936d23644f2602a5c90f5.zip
bitbake: Handle BBMainException
Some error messages were lost because BBMainException was inherited from bb.BBHandledException. When bb.BBHandledException is processed error messages are not printed as they suppose to be printed before raising this exception. Stopped to inherit BBMainException from bb.BBHandledException. Handled BBMainException in bin/bitbake and printed error message to the stderr. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin/bitbake')
-rwxr-xr-xbin/bitbake5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/bitbake b/bin/bitbake
index af915075dc..3e1ca6286c 100755
--- a/bin/bitbake
+++ b/bin/bitbake
@@ -33,12 +33,15 @@ except RuntimeError as exc:
sys.exit(str(exc))
from bb import cookerdata
-from bb.main import bitbake_main, BitBakeConfigParameters
+from bb.main import bitbake_main, BitBakeConfigParameters, BBMainException
if __name__ == "__main__":
try:
ret = bitbake_main(BitBakeConfigParameters(sys.argv),
cookerdata.CookerConfiguration())
+ except BBMainException as err:
+ print >>sys.stderr, err
+ ret = 1
except bb.BBHandledException:
ret = 1
except Exception: