* [PATCH] data: Add newline after the last export in emit_func
@ 2015-07-15 0:22 Andre McCurdy
0 siblings, 0 replies; only message in thread
From: Andre McCurdy @ 2015-07-15 0:22 UTC (permalink / raw)
To: bitbake-devel
Minor formatting improvement in generated shell scripts.
Add a newline after the last export emitted by emit_func. Also, remove
chance of putting an extra newline in the middle of the exports, since
we never want to do that.
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
lib/bb/data.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/bb/data.py b/lib/bb/data.py
index 8b21c46..2f90be6 100644
--- a/lib/bb/data.py
+++ b/lib/bb/data.py
@@ -271,8 +271,9 @@ def emit_func(func, o=sys.__stdout__, d = init()):
keys = (key for key in d.keys() if not key.startswith("__") and not d.getVarFlag(key, "func"))
for key in keys:
- emit_var(key, o, d, False) and o.write('\n')
+ emit_var(key, o, d, False)
+ o.write('\n')
emit_var(func, o, d, False) and o.write('\n')
newdeps = bb.codeparser.ShellParser(func, logger).parse_shell(d.getVar(func, True))
newdeps |= set((d.getVarFlag(func, "vardeps", True) or "").split())
--
1.9.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-15 0:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-15 0:22 [PATCH] data: Add newline after the last export in emit_func Andre McCurdy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox