From 2db5ba5f1c28184faa68fcc249f10143a4bc2245 Mon Sep 17 00:00:00 2001 From: TakWolf Date: Thu, 4 Jul 2024 11:05:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=20YAML=20=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/utils/fs_util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/utils/fs_util.py b/tools/utils/fs_util.py index 99e79e1..b734943 100644 --- a/tools/utils/fs_util.py +++ b/tools/utils/fs_util.py @@ -22,4 +22,5 @@ def write_json(data: Any, path: Path): def read_yaml(path: Path) -> Any: - return yaml.safe_load(path.read_text('utf-8')) + with path.open('rb') as file: + return yaml.safe_load(file)