use yamlutils.dumps() in init-series

This will give us standard formatting for new files.

Change-Id: I819fda12e76813cf9861007a0b9bf28744d2153a
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2017-07-28 17:08:39 -04:00
parent 8ca9ccc26a
commit 0bb989b98c

View File

@ -17,8 +17,7 @@ import os.path
import openstack_releases
from openstack_releases import deliverable
import yaml
from openstack_releases import yamlutils
def main():
@ -69,7 +68,6 @@ def main():
if key in data:
del data[key]
outfilename = os.path.join(outdir, name + '.yaml')
with open(outfilename, 'w') as f:
with open(outfilename, 'w', encoding='utf-8') as f:
print('{} created'.format(outfilename))
f.write('---\n')
yaml.dump(data, f, default_flow_style=False)
f.write(yamlutils.dumps(data))