]> git.decadent.org.uk Git - dak.git/commitdiff
Hack to not end up with None versions
authorMark Hymers <mhy@debian.org>
Sun, 9 Nov 2014 10:55:15 +0000 (10:55 +0000)
committerMark Hymers <mhy@debian.org>
Sun, 9 Nov 2014 10:55:15 +0000 (10:55 +0000)
Signed-off-by: Mark Hymers <mhy@debian.org>
dak/generate_releases.py

index 57830390aa19c0815067adb35bd6a612e34e3c13..ba7976873c6ef0b853695450338ae56d92d13d57 100755 (executable)
@@ -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()))))