summaryrefslogtreecommitdiffstats
path: root/lib/bb/data.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-26 11:41:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-26 11:50:44 +0100
commita4cd4c56284812efb2a2bc0c8667ddad073f8e94 (patch)
tree0d964700ad4dccb7bad85008fa1709d643d51198 /lib/bb/data.py
parent702b42a47904f2378dd819e7463b3206883c2651 (diff)
downloadbitbake-contrib-a4cd4c56284812efb2a2bc0c8667ddad073f8e94.tar.gz
data: Clean up expandKeys None value handling
This comparison is interesting even in the case of empty vales. Enabling this warning actually found a bug in the metadata in avahi. Make the code handle None specifically and also remove the dead code path in the second if statement. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/data.py')
-rw-r--r--lib/bb/data.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/data.py b/lib/bb/data.py
index 218998a0a..f8dc976a1 100644
--- a/lib/bb/data.py
+++ b/lib/bb/data.py
@@ -157,9 +157,9 @@ def expandKeys(alterdata, readdata = None):
continue
todolist[key] = ekey
newval = alterdata.getVar(ekey, 0)
- if newval:
+ if newval is not None:
val = alterdata.getVar(key, 0)
- if val is not None and newval is not None:
+ if val is not None:
bb.warn("Variable key %s (%s) replaces original key %s (%s)." % (key, val, ekey, newval))
# These two for loops are split for performance to maximise the