diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2023-09-27 19:16:17 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-27 23:34:23 +0100 |
commit | f3ba9c3726ec7b38b557100d8a2d4b6a1446a968 (patch) | |
tree | 7e735da3a2d26fed713b238a91eefb8a87fcd073 /bin/bitbake-getvar | |
parent | 136b8dda4e8b6f4d7e45a552c2d2e278b3ae1b7d (diff) | |
download | bitbake-contrib-f3ba9c3726ec7b38b557100d8a2d4b6a1446a968.tar.gz |
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 <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin/bitbake-getvar')
-rwxr-xr-x | bin/bitbake-getvar | 2 |
1 files changed, 1 insertions, 1 deletions
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) |