From: Zane Bitter Date: Thu, 6 Dec 2012 19:15:27 +0000 (+0100) Subject: Pass string to template_format.parse() X-Git-Tag: 2014.1~1126 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=28ea091448efaeb26839845e4655f5fdd6ff8833;p=openstack-build%2Fheat-build.git Pass string to template_format.parse() Since template_format.parse() attempts to guess the type of the input instead of using yaml.parse for everything, the input must be a string and not a stream, even though yaml.parse() can handle either. Change-Id: I07dc13a54492f3f6db17bfca3cc9e129c765eed5 Signed-off-by: Zane Bitter --- diff --git a/heat/engine/resources/stack.py b/heat/engine/resources/stack.py index 02c130f9..4f5d8499 100644 --- a/heat/engine/resources/stack.py +++ b/heat/engine/resources/stack.py @@ -76,7 +76,7 @@ class Stack(resource.Resource): def handle_create(self): response = urllib2.urlopen(self.properties[PROP_TEMPLATE_URL]) - template = template_format.parse(response) + template = template_format.parse(response.read()) self.create_with_template(template)