[bitbake-devel] [PATCH 5/6] ui/hob: don't crash if PARALLEL_MAKE doesn't include a space
Joshua Lock
josh at linux.intel.com
Thu Jul 21 18:34:22 UTC 2011
Use string.strip() as a much safer method of turning the -j value into an int
Fixes [YOCTO #1244]
Signed-off-by: Joshua Lock <josh at linux.intel.com>
---
lib/bb/ui/hob.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index aed7eac..2df344f 100644
--- a/lib/bb/ui/hob.py
+++ b/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"])
--
1.7.6
More information about the bitbake-devel
mailing list