From fe95b0a5fead002e9dc3078d7e13c1dfb07d0c69 Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Tue, 19 May 2015 13:59:58 +0200 Subject: [PATCH] JJB init script: Remove superfluous lines from autogenerated files Change-Id: I85f59b1c72a9d471c460f4d0e63177cb959f2fef Signed-off-by: Vratko Polak --- scripts/jjb-init-project.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/jjb-init-project.py b/scripts/jjb-init-project.py index ef7ec41a0..f5608d198 100644 --- a/scripts/jjb-init-project.py +++ b/scripts/jjb-init-project.py @@ -194,5 +194,8 @@ with open(project_file, "w") as outfile: line = re.sub("EMAIL_PREFIX", email_prefix, line) line = re.sub("SONAR_BRANCH", sonar_branch, line) line = re.sub("ARCHIVE_ARTIFACTS", archive_artifacts, line) + # The previous command may have created superfluous lines. + # If a line has no non-whitespace, it has to be '\n' only. + line = re.sub(r'^\s+\n', "", line) outfile.write(line) outfile.write("\n") -- 2.36.6