Merge "Replace yaml.load() with yaml.safe_load()"
This commit is contained in:
commit
1b8adaafcb
@ -196,7 +196,7 @@ class YamlUtils(object):
|
||||
def get_dict(yaml_file):
|
||||
'''Returns the dictionary representation of the given YAML spec.'''
|
||||
try:
|
||||
return yaml.load(open(yaml_file))
|
||||
return yaml.safe_load(open(yaml_file))
|
||||
except IOError:
|
||||
return None
|
||||
|
||||
|
@ -68,7 +68,7 @@ class ToscaAutoscaling(HotResource):
|
||||
return yaml.nodes.MappingNode(u'tag:yaml.org,2002:map', nodes)
|
||||
|
||||
def _handle_nested_template(self, scale_res):
|
||||
template_dict = yaml.load(HEAT_TEMPLATE_BASE)
|
||||
template_dict = yaml.safe_load(HEAT_TEMPLATE_BASE)
|
||||
template_dict['description'] = 'Tacker Scaling template'
|
||||
template_dict["resources"] = {}
|
||||
dict_res = OrderedDict()
|
||||
|
@ -214,7 +214,7 @@ class TranslatorShell(object):
|
||||
msg = _('Deploy the generated template, the stack name is %(name)s.')\
|
||||
% {'name': heat_stack_name}
|
||||
log.debug(msg)
|
||||
tpl = yaml.load(translator.translate())
|
||||
tpl = yaml.safe_load(translator.translate())
|
||||
|
||||
# get all the values for get_file from a translated template
|
||||
get_files = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user