From 0b0692475958443c0bb14c55ef3664477e749868 Mon Sep 17 00:00:00 2001 From: Andre McCurdy Date: Wed, 27 Jan 2016 16:43:17 -0800 Subject: bitbake: data.py: avoid double newlines at the end of functions in emit_var() A newline is always appended to the function body when it's written out, so strip any trailing newlines which may be there already. (Bitbake rev: 8a3f50936113e15d2f2822f6aee494204fa1c24f) Signed-off-by: Andre McCurdy Signed-off-by: Richard Purdie --- bitbake/lib/bb/data.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py index fac57da71d..70ba56b48a 100644 --- a/bitbake/lib/bb/data.py +++ b/bitbake/lib/bb/data.py @@ -227,6 +227,7 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False): if func: # NOTE: should probably check for unbalanced {} within the var + val = val.rstrip('\n') o.write("%s() {\n%s\n}\n" % (varExpanded, val)) return 1 -- cgit v1.2.3-54-g00ecf