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>
This commit is contained in:
Andre McCurdy 2016-01-27 16:43:17 -08:00 committed by Richard Purdie
parent 68600aee2d
commit 0b06924759
1 changed files with 1 additions and 0 deletions

View File

@ -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