Bug#539316: python-debian: Parsing an existing changelog duplicates newlines
John Wright
jsw at debian.org
Thu Jul 30 17:50:32 UTC 2009
tags 539316 + patch
thanks
Hi Michael,
On Thu, Jul 30, 2009 at 06:34:20PM +0200, Michael Bienia wrote:
> Package: python-debian
> Version: 0.1.14
> Severity: normal
Thanks for the report.
> I was looking if I can use the Changelog class to access changelog
> entries from a existing changelogs. The parsing of a existing changelog
> went fine but then I found out that there are no methods to iterate over
> (or access) existing changelog blocks (I'd should file a wishlist bug
> about this instead of accessing internal structures)
Yes, please file this as a separate bug...
> but the more
> important problem was that I got to many newlines when I tried to get a
> string representation of a changelog block.
> (Note: this was with pyhton 2.6 on Ubuntu if it's important)
>
> >>> c = debian_bundle.changelog.Changelog(file('changelog.txt', 'r'))
> >>> print c
To work around this for now, please pass the whole file in as a string:
>>> c = debian_bundle.changelog.Changelog(file('changelog.txt', 'r').read())
I'm attaching a patch that fixes the bug and adds a testcase. James,
would you review and apply if you agree?
--
John Wright <jsw at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug539316.patch
Type: text/x-diff
Size: 1993 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-python-debian-maint/attachments/20090730/1dd9483a/attachment.patch>
More information about the pkg-python-debian-maint
mailing list