Ensure exactly one trailing newline in rendered spec files
This commit is contained in:
parent
53d07c28ad
commit
1763c73dfa
2 changed files with 4 additions and 2 deletions
|
@ -584,7 +584,6 @@ def main():
|
|||
else:
|
||||
with open(spec_file, "w") as fobj:
|
||||
fobj.write(spec_contents)
|
||||
fobj.write("\n")
|
||||
print(f'Wrote {fobj.name}')
|
||||
for fname, diff in zip(patch_files, diffs):
|
||||
if fname:
|
||||
|
|
|
@ -109,6 +109,9 @@ def spec_file_render(
|
|||
metadata=metadata,
|
||||
patch_file_manual=patch_file_manual,
|
||||
patch_file_automatic=patch_file_automatic,
|
||||
**kwargs) + '\n'
|
||||
**kwargs)
|
||||
|
||||
if not spec_contents.endswith("\n"):
|
||||
spec_contents += "\n"
|
||||
|
||||
return spec_contents
|
||||
|
|
Loading…
Reference in a new issue