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>
if __version__ != bb.__version__:
sys.exit("Bitbake core version and program version mismatch!")
try:
- ret = bitbake_main(BitBakeConfigParameters(sys.argv),
- cookerdata.CookerConfiguration())
+ sys.exit(bitbake_main(BitBakeConfigParameters(sys.argv),
+ cookerdata.CookerConfiguration()))
except BBMainException as err:
- print >>sys.stderr, err
- ret = 1
+ sys.exit(err)
except bb.BBHandledException:
- ret = 1
+ sys.exit(1)
except Exception:
- ret = 1
import traceback
traceback.print_exc()
- sys.exit(ret)
-
+ sys.exit(1)