Skip to content

Commit 3a2165a

Browse files
committed
Fixed the file opening mode in dump_yaml method when a file path is provided as argument.
1 parent 48d5d7e commit 3a2165a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

yamlable/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def dump_yaml(self,
107107
"""
108108
from yaml import safe_dump, dump
109109
if isinstance(file_path_or_stream, str):
110-
with open(file_path_or_stream, mode='wt') as f:
110+
with open(file_path_or_stream, mode='w+t') as f:
111111
if safe:
112112
safe_dump(self, f, **pyyaml_kwargs)
113113
else:

0 commit comments

Comments
 (0)