Skip to content

Commit

Permalink
remove all yaml.load
Browse files Browse the repository at this point in the history
Signed-off-by: Kale Franz <[email protected]>
  • Loading branch information
kalefranz committed May 7, 2020
1 parent a17c8e4 commit 6ae6421
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions conda/common/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def represent_unicode(self, data):


def yaml_round_trip_load(string):
return yaml.load(string, Loader=yaml.RoundTripLoader, version="1.2")
return yaml.round_trip_load(string, version="1.2")


def yaml_safe_load(string):
Expand All @@ -64,20 +64,20 @@ def yaml_safe_load(string):
{'key': 'value'}
"""
return yaml.load(string, Loader=yaml.SafeLoader, version="1.2")
return yaml.safe_load(string, version="1.2")


def yaml_round_trip_dump(object):
"""dump object to string"""
return yaml.dump(
object, Dumper=yaml.RoundTripDumper, block_seq_indent=2, default_flow_style=False, indent=2
return yaml.round_trip_dump(
object, block_seq_indent=2, default_flow_style=False, indent=2
)


def yaml_safe_dump(object):
"""dump object to string"""
return yaml.dump(
object, Dumper=yaml.SafeDumper, block_seq_indent=2, default_flow_style=False, indent=2
return yaml.safe_dump(
object, block_seq_indent=2, default_flow_style=False, indent=2
)


Expand Down

0 comments on commit 6ae6421

Please sign in to comment.