mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
bitbake: 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). (Bitbake rev: f3ba9c3726ec7b38b557100d8a2d4b6a1446a968) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
826807785e
commit
3b46d6a41a
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user