X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fgenerate_releases.py;h=ba7976873c6ef0b853695450338ae56d92d13d57;hb=0d69fff35ef45fda573467873ae2f01ca1954650;hp=ce8f12815009a70a0ea9cb4e77eda77564c197de;hpb=ba179a1f739af0852cad9b30c5fefae190f96383;p=dak.git diff --git a/dak/generate_releases.py b/dak/generate_releases.py index ce8f1281..ba797687 100755 --- a/dak/generate_releases.py +++ b/dak/generate_releases.py @@ -137,7 +137,7 @@ class ReleaseWriter(object): # fill them in attribs = ( ('Origin', 'origin'), ('Label', 'label'), - ('Suite', 'suite_name'), + ('Suite', 'release_suite_output'), ('Version', 'version'), ('Codename', 'codename') ) @@ -159,16 +159,12 @@ class ReleaseWriter(object): out = open(outfile + ".new", "w") for key, dbfield in attribs: - if getattr(suite, dbfield) is not None: - # TEMPORARY HACK HACK HACK until we change the way we store the suite names etc - if key == 'Suite' and getattr(suite, dbfield) == 'squeeze-updates': - out.write("Suite: oldstable-updates\n") - elif key == 'Suite' and getattr(suite, dbfield) == 'wheezy-updates': - out.write("Suite: stable-updates\n") - elif key == 'Suite' and getattr(suite, dbfield) == 'jessie-updates': - out.write("Suite: testing-updates\n") - else: - out.write("%s: %s\n" % (key, getattr(suite, dbfield))) + # Hack to skip NULL Version fields as we used to do this + # We should probably just always ignore anything which is None + if key == "Version" and getattr(suite, dbfield) is None: + continue + + out.write("%s: %s\n" % (key, getattr(suite, dbfield))) out.write("Date: %s\n" % (time.strftime("%a, %d %b %Y %H:%M:%S UTC", time.gmtime(time.time()))))