From a07299f1d677d119832ae84e4a83ace65668dad6 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Thu, 27 Feb 2014 16:29:20 -0500 Subject: [PATCH] Clean up while loop in check-templates. (imported from commit 79c2cc2b1ced0fc80b0a1996fd9150b39e689a31) --- tools/check-templates | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/check-templates b/tools/check-templates index cc5f3b5edd..d224fec779 100755 --- a/tools/check-templates +++ b/tools/check-templates @@ -65,9 +65,8 @@ def validate(fn, check_indent=True): def looking_at(s): return text[state.i:state.i+len(s)] == s - while True: - if state.i >= len(text): - break + while state.i < len(text): + c = text[state.i] if c == '<': s = get_html_tag(text, state.i)