diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-26 11:41:02 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-29 10:17:16 +0100 |
commit | 30cba374ccf4db59d5d1933a53057941c8d02e10 (patch) | |
tree | 94b4ca5e6422f558187d129012de246fb59961ba /bitbake/lib/bb/data.py | |
parent | c7f01ce273576d939f356bc98a00d30269c82bcd (diff) | |
download | poky-30cba374ccf4db59d5d1933a53057941c8d02e10.tar.gz |
bitbake: 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.
(Bitbake rev: a4cd4c56284812efb2a2bc0c8667ddad073f8e94)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data.py')
-rw-r--r-- | bitbake/lib/bb/data.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py index 218998a0af..f8dc976a1c 100644 --- a/bitbake/lib/bb/data.py +++ b/bitbake/lib/bb/data.py | |||
@@ -157,9 +157,9 @@ def expandKeys(alterdata, readdata = None): | |||
157 | continue | 157 | continue |
158 | todolist[key] = ekey | 158 | todolist[key] = ekey |
159 | newval = alterdata.getVar(ekey, 0) | 159 | newval = alterdata.getVar(ekey, 0) |
160 | if newval: | 160 | if newval is not None: |
161 | val = alterdata.getVar(key, 0) | 161 | val = alterdata.getVar(key, 0) |
162 | if val is not None and newval is not None: | 162 | if val is not None: |
163 | bb.warn("Variable key %s (%s) replaces original key %s (%s)." % (key, val, ekey, newval)) | 163 | bb.warn("Variable key %s (%s) replaces original key %s (%s)." % (key, val, ekey, newval)) |
164 | 164 | ||
165 | # These two for loops are split for performance to maximise the | 165 | # These two for loops are split for performance to maximise the |