Fix warning for yaml.load()
https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation
This commit is contained in:
parent
3f495d82c4
commit
3e92f9b39b
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ class Config:
|
||||||
def load(self, file):
|
def load(self, file):
|
||||||
file = os.path.expanduser(file)
|
file = os.path.expanduser(file)
|
||||||
with open(file, 'r') as f:
|
with open(file, 'r') as f:
|
||||||
y = yaml.load(f)
|
y = yaml.safe_load(f)
|
||||||
|
|
||||||
for key in y:
|
for key in y:
|
||||||
setattr(self, key, y[key])
|
setattr(self, key, y[key])
|
||||||
|
|
Loading…
Reference in a new issue