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])
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])