Fix yaml parsing

This commit is contained in:
aerinon
2022-05-24 10:18:59 -06:00
parent 041443be3d
commit e40c4290c9
2 changed files with 10 additions and 16 deletions
-3
View File
@@ -334,9 +334,6 @@ class CustomSettings(object):
def load_yaml(path):
try:
return yaml.load(path, Loader=yaml.SafeLoader)
except yaml.YAMLError as exc:
if os.path.exists(Path(path)):
with open(path, "r", encoding="utf-8") as f:
return yaml.load(f, Loader=yaml.SafeLoader)
-3
View File
@@ -9,9 +9,6 @@ import yaml
def get_weights(path):
try:
return yaml.load(path, Loader=yaml.SafeLoader)
except yaml.YAMLError as exc:
if os.path.exists(Path(path)):
with open(path, "r", encoding="utf-8") as f:
return yaml.load(f, Loader=yaml.SafeLoader)