check-templates: Fix traceback with missing closing tag at end of file.

Previously, this would crash with an unclear traceback in this situation.
This commit is contained in:
Tim Abbott 2016-07-13 16:08:39 -07:00
parent d7ea2b8a67
commit baeaf0f870
1 changed files with 1 additions and 1 deletions

View File

@ -174,7 +174,7 @@ def get_html_tag(text, i):
if text[end] == '"': if text[end] == '"':
quote_count += 1 quote_count += 1
end += 1 end += 1
if text[end] != '>': if end == len(text) or text[end] != '>':
raise Exception('Tag missing >') raise Exception('Tag missing >')
s = text[i:end+1] s = text[i:end+1]
return s return s