diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-07-19 16:21:24 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-21 22:08:10 +0100 |
commit | 2bdd51854fde31c9f911b705a2053f684d25ebe3 (patch) | |
tree | 737a5f76fa3e92c5f76dc3efae4ee0632fb25b1d /bitbake/lib/bb/ui/hob.py | |
parent | 4eeabbe7a06292c95404d4b17b64a8748b63eca5 (diff) | |
download | poky-2bdd51854fde31c9f911b705a2053f684d25ebe3.tar.gz |
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>
Diffstat (limited to 'bitbake/lib/bb/ui/hob.py')
-rw-r--r-- | bitbake/lib/bb/ui/hob.py | 2 |
1 files changed, 1 insertions, 1 deletions
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): | |||
883 | # The PARALLEL_MAKE variable will be of the format: "-j 3" and we only | 883 | # The PARALLEL_MAKE variable will be of the format: "-j 3" and we only |
884 | # want a number for the spinner, so strip everything from the variable | 884 | # want a number for the spinner, so strip everything from the variable |
885 | # up to and including the space | 885 | # up to and including the space |
886 | pmake = int(pmake[pmake.find(" ")+1:]) | 886 | pmake = int(pmake.lstrip("-j ")) |
887 | 887 | ||
888 | image_types = server.runCommand(["getVariable", "IMAGE_TYPES"]) | 888 | image_types = server.runCommand(["getVariable", "IMAGE_TYPES"]) |
889 | 889 | ||