From f3ba9c3726ec7b38b557100d8a2d4b6a1446a968 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Wed, 27 Sep 2023 19:16:17 +0200 Subject: bitbake-getvar: Treat undefined variables as empty with --value Rather than outputting the string "None" for undefined variables, output only a linefeed (the same as for variables that are defined to the empty string). Signed-off-by: Peter Kjellerstedt Signed-off-by: Richard Purdie --- bin/bitbake-getvar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/bitbake-getvar b/bin/bitbake-getvar index 53ab90069..8901f99ae 100755 --- a/bin/bitbake-getvar +++ b/bin/bitbake-getvar @@ -55,6 +55,6 @@ if __name__ == "__main__": if value is None and not args.ignore_undefined: sys.exit(f"The variable '{args.variable}' is not defined") if args.value: - print(str(value)) + print(str(value if value is not None else "")) else: bb.data.emit_var(args.variable, d=d, all=True) -- cgit 1.2.3-korg