Skip to content

Commit 423e4e3

Browse files
committed
fix unicode bug
1 parent 780b88e commit 423e4e3

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

vao-recorder.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,10 @@ def typer_warn(message: str):
8787

8888

8989
def yaml_dump(data, to_file: Path = None) -> str:
90-
content = yaml.dump(data, allow_unicode=True)
9190
if to_file:
9291
with open(to_file, 'w') as f:
93-
f.write(content)
94-
return content
92+
return yaml.dump(data, stream=f, allow_unicode=True)
93+
return yaml.dump(data, allow_unicode=True)
9594

9695

9796
# ------------------------------ Configuration ------------------------------ #

0 commit comments

Comments
 (0)