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:
|
else:
|
||||||
with open(spec_file, "w") as fobj:
|
with open(spec_file, "w") as fobj:
|
||||||
fobj.write(spec_contents)
|
fobj.write(spec_contents)
|
||||||
fobj.write("\n")
|
|
||||||
print(f'Wrote {fobj.name}')
|
print(f'Wrote {fobj.name}')
|
||||||
for fname, diff in zip(patch_files, diffs):
|
for fname, diff in zip(patch_files, diffs):
|
||||||
if fname:
|
if fname:
|
||||||
|
|
|
@ -109,6 +109,9 @@ def spec_file_render(
|
||||||
metadata=metadata,
|
metadata=metadata,
|
||||||
patch_file_manual=patch_file_manual,
|
patch_file_manual=patch_file_manual,
|
||||||
patch_file_automatic=patch_file_automatic,
|
patch_file_automatic=patch_file_automatic,
|
||||||
**kwargs) + '\n'
|
**kwargs)
|
||||||
|
|
||||||
|
if not spec_contents.endswith("\n"):
|
||||||
|
spec_contents += "\n"
|
||||||
|
|
||||||
return spec_contents
|
return spec_contents
|
||||||
|
|
Loading…
Reference in a new issue