Bug#655988: python-debian: deb822 wrong result when space in newline after paragraph

Julian Taylor jtaylor.debian at googlemail.com
Sun Jan 15 17:46:47 UTC 2012


Package: python-debian
Version: 0.1.21
Severity: normal

attached control has a space in the newline between a paragraph (line 31)
this disturbs debian.deb822.Deb822.iter_paragraphs while other tools
seem to handle it well.

import debian.deb822

In [2]: len([p for p in
debian.deb822.Deb822.iter_paragraphs(open("control-wspace"))])
Out[2]: 2
In [3]: len([p for p in
debian.deb822.Deb822.iter_paragraphs(open("control-wospace"))])
Out[3]: 3

policy 5.1 on it:
The paragraphs are separated by empty lines. Parsers may accept lines
consisting solely of spaces and tabs as paragraph separators, but
control files *should* use empty lines.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: control
URL: <http://lists.alioth.debian.org/pipermail/pkg-python-debian-maint/attachments/20120115/a840bed0/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-python-debian-maint/attachments/20120115/a840bed0/attachment.pgp>


More information about the pkg-python-debian-maint mailing list