]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Pass string to template_format.parse()
authorZane Bitter <zbitter@redhat.com>
Thu, 6 Dec 2012 19:15:27 +0000 (20:15 +0100)
committerZane Bitter <zbitter@redhat.com>
Thu, 6 Dec 2012 19:33:51 +0000 (20:33 +0100)
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 <zbitter@redhat.com>
heat/engine/resources/stack.py

index 02c130f990a3bd5ca551c4a1d091123a34d0688b..4f5d84996ddcc391cfb322b975bcb24e673dc573 100644 (file)
@@ -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)