Merge "Replace yaml.dump with yaml.safe_dump"

This commit is contained in:
Jenkins 2017-03-18 20:12:08 +00:00 committed by Gerrit Code Review
commit 4ddff9ec53

View File

@ -13,12 +13,6 @@
import yaml
if hasattr(yaml, 'CSafeDumper'):
yaml_dumper = yaml.CSafeDumper
else:
yaml_dumper = yaml.SafeDumper
def load(s):
try:
yml_dict = yaml.safe_load(s)
@ -36,4 +30,4 @@ def load(s):
def dump(s):
return yaml.dump(s, Dumper=yaml_dumper)
return yaml.safe_dump(s)