From ba871e0118d5ecd7379ad6495baa8416bbfbba44 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 3 Mar 2012 11:07:51 +0000 Subject: 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 --- classes/base.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 444b830b6..49f8e3976 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -44,7 +44,7 @@ python do_showdata() { # emit the metadata which isnt valid shell for e in bb.data.keys(d): if d.getVarFlag(e, 'python'): - sys.__stdout__.write("\npython %s () {\n%s}\n" % (e, d.getVar(e, 1))) + sys.__stdout__.write("\npython %s () {\n%s}\n" % (e, d.getVar(e, True))) } addtask listtasks -- cgit 1.2.3-korg