aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorShane Wang <shane.wang@intel.com>2012-04-02 16:29:16 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-05 18:48:07 +0100
commitb9accbb42a40e1ace0f9790a20712b821bb2b3f6 (patch)
tree587f2c682afba2a5ed2bb15ff9a1b88c93c6b563 /bitbake
parent36164b9a9bcc41094012495e97d4633df60b0f24 (diff)
downloadopenembedded-core-contrib-b9accbb42a40e1ace0f9790a20712b821bb2b3f6.tar.gz
Hob: handle exceptions when loading templates
Handle exceptions during type conversion to integers. (Bitbake rev: bb3a4e2d40486a347c13563d73e4df6d015a3c6c) Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index df9a1558e5..0c1ee07e75 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -106,10 +106,22 @@ class Configuration:
self.dldir = template.getVar("DL_DIR")
self.sstatedir = template.getVar("SSTATE_DIR")
self.sstatemirror = template.getVar("SSTATE_MIRROR")
- self.pmake = int(template.getVar("PARALLEL_MAKE").split()[1])
- self.bbthread = int(template.getVar("BB_NUMBER_THREADS"))
- self.image_rootfs_size = int(template.getVar("IMAGE_ROOTFS_SIZE"))
- self.image_extra_size = int(template.getVar("IMAGE_EXTRA_SPACE"))
+ try:
+ self.pmake = int(template.getVar("PARALLEL_MAKE").split()[1])
+ except:
+ pass
+ try:
+ self.bbthread = int(template.getVar("BB_NUMBER_THREADS"))
+ except:
+ pass
+ try:
+ self.image_rootfs_size = int(template.getVar("IMAGE_ROOTFS_SIZE"))
+ except:
+ pass
+ try:
+ self.image_extra_size = int(template.getVar("IMAGE_EXTRA_SPACE"))
+ except:
+ pass
# image_overhead_factor is read-only.
self.incompat_license = template.getVar("INCOMPATIBLE_LICENSE")
self.curr_sdk_machine = template.getVar("SDKMACHINE")