Comment 2 for bug 440014

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Actually, no, the stupid thing is expected to be a file or fileno.

To read and verify a Release file and represent it as a dict, AFAICT, you can just:

sections = list(apt_pkg.TagFile(file(filename)))
assert len(sections) <= 1, "I don't know how to deal with multiple sections."
return dict(sections[0])