From: Andre McCurdy Date: Thu, 28 Jan 2016 00:43:17 +0000 (-0800) Subject: data.py: avoid double newlines at the end of functions in emit_var() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a3f50936113e15d2f2822f6aee494204fa1c24f;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 Signed-off-by: Richard Purdie --- diff --git a/lib/bb/data.py b/lib/bb/data.py index fac57da71d8..70ba56b48a0 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