Change-Id: I85f59b1c72a9d471c460f4d0e63177cb959f2fef
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
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")