From 2bdd51854fde31c9f911b705a2053f684d25ebe3 Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Tue, 19 Jul 2011 16:21:24 -0700 Subject: ui/hob: don't crash if PARALLEL_MAKE doesn't include a space Use string.strip() as a much safer method of turning the -j value into an int Fixes [YOCTO #1244] (Bitbake rev: 03baee9e0a7fc15fc6c226c07c0f50df136ac5b0) Signed-off-by: Joshua Lock Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/hob.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake/lib/bb/ui') diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py index aed7eacbaa..2df344f1ed 100644 --- a/bitbake/lib/bb/ui/hob.py +++ b/bitbake/lib/bb/ui/hob.py @@ -883,7 +883,7 @@ def main (server, eventHandler): # The PARALLEL_MAKE variable will be of the format: "-j 3" and we only # want a number for the spinner, so strip everything from the variable # up to and including the space - pmake = int(pmake[pmake.find(" ")+1:]) + pmake = int(pmake.lstrip("-j ")) image_types = server.runCommand(["getVariable", "IMAGE_TYPES"]) -- cgit v1.2.3-54-g00ecf