aboutsummaryrefslogtreecommitdiffstats
path: root/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-29 17:06:04 +0000
commit8a3f50936113e15d2f2822f6aee494204fa1c24f (patch)
tree57df87b1e36701023ffe34b42770c3bb7e74615c /lib/bb/data.py
parent8e12c8f8441a7c6a03e603c5789d6037945704c1 (diff)
downloadbitbake-8a3f50936113e15d2f2822f6aee494204fa1c24f.tar.gz
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. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/data.py')
-rw-r--r--lib/bb/data.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bb/data.py b/lib/bb/data.py
index fac57da71..70ba56b48 100644
--- a/lib/bb/data.py
+++ b/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