Don't output additional newlines
authorGuido Günther <agx@sigxcpu.org>
Fri, 20 Feb 2015 16:18:05 +0000 (17:18 +0100)
committerGuido Günther <agx@sigxcpu.org>
Fri, 20 Feb 2015 17:47:30 +0000 (18:47 +0100)
introduced by 0a4725c045a5a55592dafd41c6ef6f9bab4791cd

gbp/deb/changelog.py
tests/test_Changelog.py

index a483b3392d8de24a5dcc73254ed7de3613f047f6..1866368fa6629fe98ab8106cec0ada8b6ac36301 100644 (file)
@@ -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=[]):
index 8f807ee2ca21729b9f95df52ac0b821452f6b84a..a22731f1d9e3848df71d6761f98ecdefb98edfd7 100644 (file)
@@ -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