Switch to yaml.safe_load to squash warnings
This commit is contained in:
parent
38e8adcec3
commit
40b64471c9
@ -54,7 +54,7 @@ def load(file):
|
||||
_data = json.loads(_data)
|
||||
elif _type == '---':
|
||||
_data = re.search('\n(.*)\n', _data.group(0), re.DOTALL).group(0)
|
||||
_data = yaml.load(_data)
|
||||
_data = yaml.safe_load(_data)
|
||||
else:
|
||||
data = {}
|
||||
|
||||
|
@ -117,17 +117,17 @@ def load(lang='en'):
|
||||
pinout_path = os.path.join(BASE_DIR,'src/{}/template/{}'.format(lang, PINOUT_FILE))
|
||||
|
||||
if SETTINGS_FILE.endswith('.yaml'):
|
||||
settings = yaml.load(open(settings_path).read())
|
||||
settings = yaml.safe_load(open(settings_path).read())
|
||||
else:
|
||||
settings = json.load(open(settings_path))
|
||||
|
||||
if STRINGS_FILE.endswith('.yaml'):
|
||||
strings = yaml.load(open(strings_path).read())
|
||||
strings = yaml.safe_load(open(strings_path).read())
|
||||
else:
|
||||
strings = json.load(open(strings_path))
|
||||
|
||||
if PINOUT_FILE.endswith('.yaml'):
|
||||
pinout = yaml.load(open(pinout_path).read())
|
||||
pinout = yaml.safe_load(open(pinout_path).read())
|
||||
else:
|
||||
pinout = json.load(open(pinout_path))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user