From: Guido Günther Date: Fri, 20 Feb 2015 16:18:05 +0000 (+0100) Subject: Don't output additional newlines X-Git-Tag: debian/0.6.24~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2a37ea2f99152c70ee4386b30ed280831aee150;p=tools%2Fgit-buildpackage.git Don't output additional newlines introduced by 0a4725c045a5a55592dafd41c6ef6f9bab4791cd --- diff --git a/gbp/deb/changelog.py b/gbp/deb/changelog.py index a483b339..1866368f 100644 --- a/gbp/deb/changelog.py +++ b/gbp/deb/changelog.py @@ -272,7 +272,7 @@ class ChangeLog(object): for line in msg[1:]: print(" " + line, file=new_cl) else: - print(line, file=new_cl) + print(line, end='', file=new_cl) os.rename("debian/changelog.bak", "debian/changelog") def add_entry(self, msg, author=None, email=None, dch_options=[]): diff --git a/tests/test_Changelog.py b/tests/test_Changelog.py index 8f807ee2..a22731f1 100644 --- a/tests/test_Changelog.py +++ b/tests/test_Changelog.py @@ -302,6 +302,8 @@ def test_add_entry(): True >>> 'Test add entry' in cl['Changes'] True + >>> cl['Changes'].split('*',1)[1] + ' Test add section\\n * Test add entry' >>> os.chdir(olddir) >>> os.path.abspath(os.path.curdir) == olddir True