summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-04-28 15:52:18 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-29 10:59:53 +0100
commit4eeae70a451e25143036bc2d4118d64b2ab1d850 (patch)
treee887070b9aed4002bf021a9d42ac5db0edca3569
parent37e46e49ddf71ebf588f565f041aaec13a802dfa (diff)
downloadpoky-4eeae70a451e25143036bc2d4118d64b2ab1d850.tar.gz
bitbake: bitbake: use sys.exit to simplify the code
Used sys.exit instead of assigning exit code to variable. This way it's more clear when bitbake exists and which exit code is used. (Bitbake rev: 5ecb8817bd49223652ede4fe513f1a42f2196798) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/bin/bitbake13
1 files changed, 5 insertions, 8 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index 88ac8c34ca..b6f19ef27e 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -41,16 +41,13 @@ if __name__ == "__main__":
41 if __version__ != bb.__version__: 41 if __version__ != bb.__version__:
42 sys.exit("Bitbake core version and program version mismatch!") 42 sys.exit("Bitbake core version and program version mismatch!")
43 try: 43 try:
44 ret = bitbake_main(BitBakeConfigParameters(sys.argv), 44 sys.exit(bitbake_main(BitBakeConfigParameters(sys.argv),
45 cookerdata.CookerConfiguration()) 45 cookerdata.CookerConfiguration()))
46 except BBMainException as err: 46 except BBMainException as err:
47 print >>sys.stderr, err 47 sys.exit(err)
48 ret = 1
49 except bb.BBHandledException: 48 except bb.BBHandledException:
50 ret = 1 49 sys.exit(1)
51 except Exception: 50 except Exception:
52 ret = 1
53 import traceback 51 import traceback
54 traceback.print_exc() 52 traceback.print_exc()
55 sys.exit(ret) 53 sys.exit(1)
56