summaryrefslogtreecommitdiff
path: root/changelog.py
diff options
context:
space:
mode:
authorPierre-Yves David <pierre-yves.david@logilab.fr>2008-06-27 09:52:33 +0200
committerPierre-Yves David <pierre-yves.david@logilab.fr>2008-06-27 09:52:33 +0200
commit6babac2685a28e83509584466277bf34ab1395e0 (patch)
tree61ab3fa55bdd9994e2f5062b85facd9af52defa8 /changelog.py
parent8bf1f035c9e3eda62011b5b2d6f663263b33177e (diff)
downloadlogilab-common-6babac2685a28e83509584466277bf34ab1395e0.tar.gz
changelog propertly adds new line at the end of each entry
Diffstat (limited to 'changelog.py')
-rw-r--r--changelog.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/changelog.py b/changelog.py
index 9f129c6..81c2504 100644
--- a/changelog.py
+++ b/changelog.py
@@ -108,7 +108,8 @@ class ChangeLogEntry(object):
for msg in self.messages:
stream.write('%s%s %s\n' % (INDENT, BULLET, msg[0]))
stream.write(''.join(msg[1:]))
-
+ if self.messages[-1][0].strip():
+ stream.write('\n')
class ChangeLog(object):
"""object representation of a whole ChangeLog file"""
@@ -175,7 +176,7 @@ class ChangeLog(object):
self.title = '%s%s' % (self.title, line)
elif sline and sline[0] == BULLET:
last.add_message(sline[1:].strip())
- elif last.messages:
+ elif sline and last.messages:
last.complete_latest_message(line)
else:
self.additional_content += line