Skip to content

Commit 50d713d

Browse files
committed
chore: 配置编码为 UTF-8
1 parent 3bf49fb commit 50d713d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ def __init__(self):
1111

1212
def load(self):
1313
try:
14-
with open(ROOT_PATH / "config" / "config.yml", "r") as f:
14+
with open(ROOT_PATH / "config" / "config.yml", "r", encoding="utf-8") as f:
1515
self._data = yaml.safe_load(f) or {}
1616
except:
1717
print("[Config] Failed to load config.yml")
1818
print(traceback.format_exc())
1919

2020
def save(self):
21-
with open(ROOT_PATH / "config" / "config.yml", "w") as f:
21+
with open(ROOT_PATH / "config" / "config.yml", "w", encoding="utf-8") as f:
2222
yaml.dump(self._data, f)
2323

2424
def _get_keys(self, key: str):

0 commit comments

Comments
 (0)