Bug#593525: python-debian: Please add a Control object
Benjamin Drung
bdrung at ubuntu.com
Wed Aug 18 23:25:30 UTC 2010
Package: python-debian
Version: 0.1.16
Severity: wishlist
I want to parse a debian/control file and found no 'Control' object that
represents a debian/control file. I had to create my own Crontol object that
contains a list of Deb822 objects:
def get_blocks(blocks, line):
if line.strip() == "":
blocks.append(list())
else:
blocks[-1].append(line)
return blocks
lines = open("debian/control").readlines()
blocks = reduce(get_blocks, lines, [[]])
self.blocks = map(debian.deb822.Deb822, blocks)
Please add a Control object.
More information about the pkg-python-debian-maint
mailing list