We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 780b88e commit 423e4e3Copy full SHA for 423e4e3
1 file changed
vao-recorder.py
@@ -87,11 +87,10 @@ def typer_warn(message: str):
87
88
89
def yaml_dump(data, to_file: Path = None) -> str:
90
- content = yaml.dump(data, allow_unicode=True)
91
if to_file:
92
with open(to_file, 'w') as f:
93
- f.write(content)
94
- return content
+ return yaml.dump(data, stream=f, allow_unicode=True)
+ return yaml.dump(data, allow_unicode=True)
95
96
97
# ------------------------------ Configuration ------------------------------ #
0 commit comments