From 23609eb945514140f8601107ef04ae9d1dcfdb86 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Sun, 15 Sep 2019 17:45:06 +0200 Subject: Put an empty list in list fields in the empty data. --- lesana/collection.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lesana/collection.py b/lesana/collection.py index 766617c..464dbde 100644 --- a/lesana/collection.py +++ b/lesana/collection.py @@ -56,6 +56,8 @@ class Entry(object): data += ("{name}: |\n .\n".format(**field)) elif t == 'integer': data += ("{name}: 0\n".format(**field)) + elif t == 'list': + data += ("{name}: []\n".format(**field)) else: data += ("{name}: \n".format(**field)) return ruamel.yaml.load(data, Loader=ruamel.yaml.RoundTripLoader) -- cgit v1.2.3