diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-03 11:07:51 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-03 11:07:51 +0000 |
commit | ba871e0118d5ecd7379ad6495baa8416bbfbba44 (patch) | |
tree | 214a1d6928560dc15ba04c81ae2ed32c50c8b3ed /lib/bb/data_smart.py | |
parent | 9c3fbc7b2964f001f2dd49b6efd98ba9a42528ad (diff) | |
download | bitbake-contrib-ba871e0118d5ecd7379ad6495baa8416bbfbba44.tar.gz |
bitbake: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)
Using "1" with getVar is bad coding style and "True" is preferred.
This patch is a sed over bitbake directory of the form:
sed \
-e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \
-e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \
-i `grep -ril getVar *`
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/data_smart.py')
-rw-r--r-- | lib/bb/data_smart.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py index 7765f81b5..2c200db32 100644 --- a/lib/bb/data_smart.py +++ b/lib/bb/data_smart.py @@ -58,7 +58,7 @@ class VariableParse: if self.varname and key: if self.varname == key: raise Exception("variable %s references itself!" % self.varname) - var = self.d.getVar(key, 1) + var = self.d.getVar(key, True) if var is not None: self.references.add(key) return var |