Fix warning for yaml.load()

https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation
This commit is contained in:
Stefan Bethke 2019-07-08 12:26:23 +02:00
parent 3f495d82c4
commit 3e92f9b39b

View file

@ -63,7 +63,7 @@ class Config:
def load(self, file):
file = os.path.expanduser(file)
with open(file, 'r') as f:
y = yaml.load(f)
y = yaml.safe_load(f)
for key in y:
setattr(self, key, y[key])