From ac4711a458fa70f9ca305c56a592bf4586ed372a Mon Sep 17 00:00:00 2001 From: Frank7Zeng Date: Wed, 19 Apr 2023 08:30:02 +0000 Subject: [PATCH] =?UTF-8?q?update=20distributed/main=5Fsharding=5Fconfig.p?= =?UTF-8?q?y.=20yaml.load()=E4=B8=BA=E4=B8=8D=E5=AE=89=E5=85=A8=E7=9A=84?= =?UTF-8?q?=E5=87=BD=E6=95=B0=EF=BC=8C=E5=85=B6=E5=8F=AF=E8=BD=BB=E6=98=93?= =?UTF-8?q?=E7=9A=84=E8=B0=83=E7=94=A8=E4=BB=BB=E4=BD=95python=E5=87=BD?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E4=BB=8E=E8=80=8C=E4=BD=BFyaml=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=E5=88=B0=E4=B8=80=E4=BA=9B=E6=81=B6=E6=84=8F=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E5=BD=B1=E5=93=8D=E7=A8=8B=E5=BA=8F=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E6=80=A7=E3=80=82=E5=9B=A0=E6=AD=A4=E5=BB=BA=E8=AE=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=AE=89=E5=85=A8=E7=9A=84yaml.safe=5Fload()?= =?UTF-8?q?=E6=96=B9=E6=B3=95=EF=BC=8C=E8=AF=A5=E6=96=B9=E6=B3=95=E5=8F=AF?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E7=9A=84=E5=8A=A0=E8=BD=BDyaml=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E5=AD=90=E9=9B=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank7Zeng --- distributed/main_sharding_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distributed/main_sharding_config.py b/distributed/main_sharding_config.py index 6254d01..bd9661e 100644 --- a/distributed/main_sharding_config.py +++ b/distributed/main_sharding_config.py @@ -172,13 +172,13 @@ class Format: def load(cls): with open(PathConf.get_src_yaml(), "rt", encoding='utf-8') as f: count = f.read() - return yaml.load(count) + return yaml.safe_load(count) @classmethod def load_user_input(cls): with open(PathConf.get_user_input_yaml(), "rt", encoding='utf-8') as f: count = f.read() - return yaml.load(count) + return yaml.safe_load(count) @classmethod def modified_output(cls): -- Gitee