Skip to content

Commit

Permalink
Update ConfigParserLocal.py
Browse files Browse the repository at this point in the history
change yaml load to yaml safe_load
  • Loading branch information
shaunwbell committed Nov 15, 2024
1 parent 3522dc7 commit 62cf636
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions io_utils/ConfigParserLocal.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_config(infile, ftype='yaml'):
raise RuntimeError('{0} not found'.format(infile))
elif ftype in ['yaml']:
try:
d = yaml.load(open(infile))
d = yaml.safe_load(open(infile))
except:
raise RuntimeError('{0} not found'.format(infile))
else:
Expand Down Expand Up @@ -91,7 +91,7 @@ def yaml2pyini(infile, **kwargs):
infile = str(infile)

try:
d = json.dumps(yaml.load(open(infile)), **kwargs)
d = json.dumps(yaml.safe_load(open(infile)), **kwargs)

except:
raise RuntimeError('{0} not found'.format(infile))
Expand Down

0 comments on commit 62cf636

Please sign in to comment.