summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gbp/rpm/changelog.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gbp/rpm/changelog.py b/gbp/rpm/changelog.py
index 82e95b86..f7dda97a 100644
--- a/gbp/rpm/changelog.py
+++ b/gbp/rpm/changelog.py
@@ -148,13 +148,13 @@ class ChangelogParser(object):
"""Parse changelog - only splits out raw changelog sections."""
changelog = Changelog(self._pkgpolicy)
ch_section = ""
- for line in string:
+ for line in string.splitlines():
if re.match(self.section_match_re, line, re.M | re.S):
if ch_section:
changelog.sections.append(ch_section)
- ch_section = line
+ ch_section = line + '\n'
elif ch_section:
- ch_section += line
+ ch_section += line + '\n'
else:
raise ChangelogError("First line in changelog is invalid")
if ch_section: