Fix crash if the charter text file isn't found.

- Legacy-Id: 4206
This commit is contained in:
Ole Laursen 2012-03-24 14:08:23 +00:00
parent 70b1271f35
commit fc921ecb72

View file

@ -271,7 +271,11 @@ def _get_html(key, filename, split=True):
f = open(filename, 'rb')
raw_content = f.read()
except IOError:
return ("Error; cannot read ("+key+")", "")
error = "Error; cannot read ("+key+")"
if split:
return (error, "")
else:
return error
finally:
if f:
f.close()