summaryrefslogtreecommitdiffstats
path: root/lib/bb/ui/hob.py
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-08-03 10:39:00 -0700
committerJoshua Lock <josh@linux.intel.com>2011-08-03 10:39:00 -0700
commit28c71e63355ca94402a9049b8a07046e7b460026 (patch)
treef85bd4aeaf49286a93862946b9acaf9737b4629a /lib/bb/ui/hob.py
parent25ec13075855f7e321a9763682a8cd4ca09203cd (diff)
downloadbitbake-28c71e63355ca94402a9049b8a07046e7b460026.tar.gz
bb/ui/hob: fix detection of whether GPLv3 is disabled
Find returns -1 if the substring isn't found, so checking for the Truthiness of the return value is insufficient. An INCOMPATIBLE_LICENSE value which only includes GPLv3 will cause find to return 0, for example. Fixes [YOCTO #1320] Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'lib/bb/ui/hob.py')
-rw-r--r--lib/bb/ui/hob.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index a770fc289..5998e6bbf 100644
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -954,7 +954,7 @@ def main (server, eventHandler):
incompatible = server.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"])
gplv3disabled = False
- if incompatible and incompatible.lower().find("gplv3"):
+ if incompatible and incompatible.lower().find("gplv3") != -1:
gplv3disabled = True
build_toolchain = bool(server.runCommand(["getVariable", "HOB_BUILD_TOOLCHAIN"]))