Skip to content

Commit

Permalink
Use safe_load instead of load (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
anurag6 authored Oct 19, 2021
1 parent 6a18808 commit 9f0464c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Depends: python3-faucet (= FAUCET_VERSION),
python3-protobuf,
python3-psutil,
python3-watchdog,
python3-yaml,
python3-yaml (>= 5.4.1), python3-yaml (<< 6.0),
Description: The Faucet Orchestrator for controlling and monitoring a faucet network.

Package: forch
Expand Down
2 changes: 1 addition & 1 deletion etc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ protobuf
psutil
pylint==2.7.4
pytricia
pyyaml
pyyaml>=5.4.1,<6.0
ryu==4.32
setuptools
watchdog
Expand Down
2 changes: 1 addition & 1 deletion forch/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def yaml_proto(file_name, proto_func):

def yaml_content_proto(content, proto_func):
"""Load a yaml formatted str into a proto object"""
file_dict = yaml.load(content)
file_dict = yaml.safe_load(content)
return json_format.ParseDict(file_dict, proto_func())


Expand Down

0 comments on commit 9f0464c

Please sign in to comment.