From: Jenkins Date: Fri, 23 Aug 2013 06:33:46 +0000 (+0000) Subject: Merge "Convert heat.common.template_format to use C yaml" X-Git-Tag: 2014.1~164 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=083ecf430a3ee6dbf8f1b01bfcc16f38bdc41a68;p=openstack-build%2Fheat-build.git Merge "Convert heat.common.template_format to use C yaml" --- 083ecf430a3ee6dbf8f1b01bfcc16f38bdc41a68 diff --cc heat/common/template_format.py index fe8b4fb0,fe5c4e98..a77b30dd --- a/heat/common/template_format.py +++ b/heat/common/template_format.py @@@ -37,13 -40,13 +46,13 @@@ yaml_loader.add_constructor(u'tag:yaml. # datetime.data which causes problems in API layer when being processed by # openstack.common.jsonutils. Therefore, make unicode string out of timestamps # until jsonutils can handle dates. - yaml.Loader.add_constructor(u'tag:yaml.org,2002:timestamp', + yaml_loader.add_constructor(u'tag:yaml.org,2002:timestamp', + _construct_yaml_str) + yaml_loader.add_constructor(u'tag:yaml.org,2002:timestamp', _construct_yaml_str) - yaml.SafeLoader.add_constructor(u'tag:yaml.org,2002:timestamp', - _construct_yaml_str) -def parse(tmpl_str, add_template_sections=True): +def parse(tmpl_str): ''' Takes a string and returns a dict containing the parsed structure. This includes determination of whether the string is using the