summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data.py
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2016-01-27 16:43:17 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-30 11:43:55 +0000
commit0b0692475958443c0bb14c55ef3664477e749868 (patch)
tree60d9f4dd86c8fa549f2dc9e5c3efef9300024259 /bitbake/lib/bb/data.py
parent68600aee2d49c66fa74d4bee44a5633bb6790e21 (diff)
downloadpoky-0b0692475958443c0bb14c55ef3664477e749868.tar.gz
poky-0b0692475958443c0bb14c55ef3664477e749868.tar.bz2
poky-0b0692475958443c0bb14c55ef3664477e749868.zip
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 <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data.py')
-rw-r--r--bitbake/lib/bb/data.py1
1 files changed, 1 insertions, 0 deletions
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