aboutsummaryrefslogtreecommitdiffstats
path: root/docs/model/current/schema/yaml2json.py
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2021-12-22 08:24:24 +0100
committerPeter Mikus <pmikus@cisco.com>2021-12-22 08:32:53 +0000
commit98ac029416d6c46755d2844e604f463930df119c (patch)
treedc55d9be1ecce7d4448869ff3768dc23326c3f55 /docs/model/current/schema/yaml2json.py
parent7b8d6693710b4d6a239c50ea0c9b7a9d611ec25c (diff)
fix(uti): Fixing broken code part I
Part of fixing chain after early merge. Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: Ie8f50fb84212c63ac9e225dfcb9bbc74fb2dd624
Diffstat (limited to 'docs/model/current/schema/yaml2json.py')
-rw-r--r--docs/model/current/schema/yaml2json.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/docs/model/current/schema/yaml2json.py b/docs/model/current/schema/yaml2json.py
index 6927bc0172..e891d04439 100644
--- a/docs/model/current/schema/yaml2json.py
+++ b/docs/model/current/schema/yaml2json.py
@@ -23,7 +23,6 @@ import yaml
for filename in glob.glob(u"*.schema.yaml"):
name = filename[:-5]
- with open(f"{name}.yaml", u"rt") as fin:
+ with open(f"{name}.yaml", u"r") as fin, open(f"{name}.json", u"w") as fout:
data = yaml.load(fin.read())
- with open(f"{name}.json", u"wt") as fout:
json.dump(data, fout, indent=2)