Bug#597120: python-debian: Changes: Should raise exception when serializing invalid data
Jelmer Vernooij
jelmer at debian.org
Thu Sep 16 19:14:28 UTC 2010
Package: python-debian
Version: 0.1.17~bzr184~launchpad1
Severity: normal
The Changes() object (but probably other deb822-style objects as well)
don't handle the situation very well when a field that contains empty
lines is followed by another field:
#!/usr/bin/python
from debian.deb822 import Changes
x = Changes()
x["Changes"] = """Foo
Bar
"""
x["Format"] = "1.8"
y = Changes(x.dump())
print y["Format"]
It would be nice if an exception was raised instead of an invalid changes file
being written.
-- System Information:
Debian Release: squeeze/sid
APT prefers maverick-updates
APT policy: (500, 'maverick-updates'), (500, 'maverick-security'), (500, 'maverick-backports'), (500, 'maverick')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.35-21-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python-debian depends on:
ii python 2.6.6-1ubuntu1 interactive high-level object-orie
ii python-support 1.0.9ubuntu1 automated rebuilding support for P
Versions of packages python-debian recommends:
ii python-apt 0.7.96.1ubuntu10 Python interface to libapt-pkg
Versions of packages python-debian suggests:
ii gpgv 1.4.10-2ubuntu2 GNU privacy guard - signature veri
-- no debconf information
More information about the pkg-python-debian-maint
mailing list