* [PATCH] bitbake: use sys.exit to simplify the code
@ 2015-04-28 12:52 Ed Bartosh
0 siblings, 0 replies; only message in thread
From: Ed Bartosh @ 2015-04-28 12:52 UTC (permalink / raw)
To: bitbake-devel
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.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
bitbake/bin/bitbake | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index 88ac8c3..b6f19ef 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -41,16 +41,13 @@ if __name__ == "__main__":
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)
--
2.1.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-04-28 12:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-28 12:52 [PATCH] bitbake: use sys.exit to simplify the code Ed Bartosh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox