From: Mark Hymers Date: Sun, 9 Nov 2014 10:55:15 +0000 (+0000) Subject: Hack to not end up with None versions X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=d539a8b77c965d121c29c8a209d29b75588210b1;p=dak.git Hack to not end up with None versions Signed-off-by: Mark Hymers --- diff --git a/dak/generate_releases.py b/dak/generate_releases.py index 57830390..ba797687 100755 --- a/dak/generate_releases.py +++ b/dak/generate_releases.py @@ -159,6 +159,11 @@ class ReleaseWriter(object): out = open(outfile + ".new", "w") for key, dbfield in attribs: + # 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()))))