Commit db1b35cc by Eric Naeseth Committed by Chris Wanstrath

Helping to ensure the template file gets closed.

parent 112ac76d
......@@ -55,8 +55,10 @@ class View(object):
self.template_file = os.path.join(self.template_path, name)
f = open(self.template_file, 'r')
template = f.read()
f.close()
try:
template = f.read()
finally:
f.close()
return template
def get_template_name(self, name=None):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment