Version update with release notes

Switch to safe loader
This commit is contained in:
aerinon
2021-05-04 16:26:45 -06:00
parent a3b5cb4baa
commit a2fcad1e22
3 changed files with 9 additions and 2 deletions

View File

@@ -86,7 +86,7 @@ def get_weights(path):
if urllib.parse.urlparse(path).scheme:
return yaml.load(urllib.request.urlopen(path), Loader=yaml.FullLoader)
with open(path, 'r', encoding='utf-8') as f:
return yaml.load(f, Loader=yaml.FullLoader)
return yaml.load(f, Loader=yaml.SafeLoader)
except Exception as e:
raise Exception(f'Failed to read weights file: {e}')