mirror of
https://github.com/justinian/j6-uefi-headers.git
synced 2025-12-10 00:24:32 -08:00
Merge pull request #1 from tkchia/master
generate.py: get it working with PyYAML 5.3.1 and Jinja2 2.11.2
This commit is contained in:
@@ -17,7 +17,7 @@ os.makedirs(protos_dir, exist_ok=True)
|
|||||||
proto_template = env.get_template("proto.j2")
|
proto_template = env.get_template("proto.j2")
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
protos = yaml.load(open("protos.yaml"))
|
protos = yaml.safe_load(open("protos.yaml"))
|
||||||
for proto in protos:
|
for proto in protos:
|
||||||
with open(os.path.join(protos_dir, proto["name"] + ".h"), 'w') as header:
|
with open(os.path.join(protos_dir, proto["name"] + ".h"), 'w') as header:
|
||||||
header.write(template.render(proto_template))
|
header.write(proto_template.render(proto))
|
||||||
|
|||||||
Reference in New Issue
Block a user