heat: close file before parsing template 51/27151/1
authorRoss Brattain <ross.b.brattain@intel.com>
Sun, 8 Jan 2017 09:03:30 +0000 (01:03 -0800)
committerRoss Brattain <ross.b.brattain@intel.com>
Wed, 18 Jan 2017 07:29:43 +0000 (23:29 -0800)
we don't need to keep the file open once
we have read it

Change-Id: I7234fe91d2080d357c7a6506543cef067a9c2aac
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
yardstick/orchestrator/heat.py

index 7e0f360..3e47dcb 100644 (file)
@@ -179,7 +179,7 @@ class HeatTemplate(HeatObject):
             with open(template_file) as stream:
                 print("Parsing external template:", template_file)
                 template_str = stream.read()
-                self._template = template_format.parse(template_str)
+            self._template = template_format.parse(template_str)
             self._parameters = heat_parameters
         else:
             self._init_template()