Verified Commit 71d7252d authored by Jan Alexander Steffens (heftig)'s avatar Jan Alexander Steffens (heftig)
Browse files

db-write: Don't write out empty list fields

parent 5d842eb0
......@@ -9,10 +9,12 @@ from sys import argv, exit
def writefield(out: io.StringIO, name: str, field):
if isinstance(field, list):
print(f"%{name}%", *field, sep="\n", end="\n\n", file=out)
elif field is not None:
if field is None:
pass
elif not isinstance(field, list):
print(f"%{name}%", field, sep="\n", end="\n\n", file=out)
elif field:
print(f"%{name}%", *field, sep="\n", end="\n\n", file=out)
def descfile(base: str, version: str, data) -> bytes:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment