From 740baf4476c71982670a773e84513cdfe71886dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Fri, 3 Jun 2016 18:30:10 +0200 Subject: avoid trailing newline after last %changelog entry --- MgaRepo/log.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'MgaRepo') diff --git a/MgaRepo/log.py b/MgaRepo/log.py index 84ed5cc..d7ad511 100644 --- a/MgaRepo/log.py +++ b/MgaRepo/log.py @@ -308,7 +308,8 @@ def dump_file(releases, currentlog=None, template=None): first = False else: draft = draft + spaces + line + "\n" - draft += '\n' + if rel is not releases_author[-1]: + draft += "\n" else: # default template if not releases_author[-1].visible: @@ -331,7 +332,8 @@ def dump_file(releases, currentlog=None, template=None): for rev in author.revisions: for line in rev.lines: draft = draft + line + "\n" - draft += "\n" + if rel is not releases_author[-1]: + draft += "\n" return draft class InvalidEntryError(Exception): -- cgit v1.2.1