- 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 in ("Version", "Changelogs") and getattr(suite, dbfield) is None:
+ continue
+
+ out.write("%s: %s\n" % (key, getattr(suite, dbfield)))