From 6283754340111c6771a2fe2373d1936648567885 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Mon, 24 Feb 2014 14:24:25 -0600 Subject: [PATCH] Fixing several bugs in assemble and updating tests Bugfixes: * the remote_src param was not being converted to a boolean correctly, resulting in it never being used by the module as the default behavior was remote_src=True (issue #5581) * the remote_src param was not listed in the generic file params, leading to a failure when the above bug regarding remote_src was fixed * the delimiter should always end with a newline to ensure that the file fragments do not run together on one line Fixes #5581 --- files/assemble | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/files/assemble b/files/assemble index b36c6e29ffb..a8c78256e23 100644 --- a/files/assemble +++ b/files/assemble @@ -107,7 +107,11 @@ def assemble_from_fragments(src_path, delimiter=None, compiled_regexp=None): continue fragment = "%s/%s" % (src_path, f) if delimit_me and delimiter: - tmp.write("%s\n" % delimiter) + tmp.write(delimiter) + # always make sure there's a newline after the + # delimiter, so lines don't run together + if delimiter[-1] != '\n': + tmp.write('\n') if os.path.isfile(fragment): tmp.write(file(fragment).read()) delimit_me = True