Skip to content

Commit

Permalink
Updating YAML Parser
Browse files Browse the repository at this point in the history
New version of Python YAML parser needs to use safe_load or a loader argument.
  • Loading branch information
jharper-sec authored Mar 26, 2024
1 parent 29eea4e commit 6d40534
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parseyaml.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import yaml, json
with open('./contrast_security.yaml') as f:
config = yaml.load(f)
config = yaml.safe_load(f)
print(json.dumps(config['api']))

0 comments on commit 6d40534

Please sign in to comment.