Fix a bug in write_control: we use lists and not dictionaries for storing

source packages in memory.
This commit is contained in:
Fabio Tranchitella 2008-05-28 11:13:56 +00:00
parent 13a0f4d654
commit 633eb5301f

View File

@ -833,9 +833,8 @@ class Britney:
f = open(filename, 'w')
for src in sources:
output = "Package: %s\n" % src
for k in ('Version', 'Section', 'Maintainer'):
key = k.lower()
if key not in sources[src] or not sources[src][key]: continue
for key, k in ((VERSION, 'Version'), (SECTION, 'Section'), (MAINTAINER, 'Maintainer')):
if not sources[src][key]: continue
output += (k + ": " + sources[src][key] + "\n")
f.write(output + "\n")
f.close()