summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-02-27 17:09:16 +0200
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-02-27 17:15:41 +0200
commite7c8c6a1f2df4f5acd2bd4ad911af20fd8addd47 (patch)
tree61e9fb7f9a678b79a46c64cb5bc75bfe6943d00e
parent79673a8faf889c61e40f08935ec1092418e199d5 (diff)
downloadgit-buildpackage-e7c8c6a1f2df4f5acd2bd4ad911af20fd8addd47.tar.gz
git-buildpackage-e7c8c6a1f2df4f5acd2bd4ad911af20fd8addd47.tar.bz2
git-buildpackage-e7c8c6a1f2df4f5acd2bd4ad911af20fd8addd47.zip
rpm.changelog: fix dumb mistake in changelog parsing
Change-Id: Id0f4e270c666fb2c823a1a7745bd70e5a41568e0 Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-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: