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 <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Lock 2011-07-19 16:21:24 -07:00 committed by Richard Purdie
parent 4eeabbe7a0
commit 2bdd51854f
1 changed files with 1 additions and 1 deletions

View File

@ -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"])