Skip to content

Commit

Permalink
Use a safer LibYAML loader when parsing .yaml configuration for the C…
Browse files Browse the repository at this point in the history
…LI arguments.

PiperOrigin-RevId: 416926145
  • Loading branch information
TheLinuxGuy authored and Capirca Team committed Dec 17, 2021
1 parent 43f8359 commit df7711f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions capirca/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
def yaml_loader(filename):
with open(filename, 'r') as f:
try:
data = yaml.load(f, Loader=yaml.CLoader)
data = yaml.safe_load(f)
except AttributeError:
data = yaml.load(f, Loader=yaml.Loader)
data = yaml.safe_load(f)

return data

Expand Down

0 comments on commit df7711f

Please sign in to comment.