From 3e9ceaeaf09b5f046a56bb3d2ea0b24e2cba9d1b Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Fri, 8 Jul 2016 19:44:12 +0000 Subject: [PATCH] Move templates check to ok() function. --- tools/check-templates | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/check-templates b/tools/check-templates index ed8bf78d05..c292710908 100755 --- a/tools/check-templates +++ b/tools/check-templates @@ -181,14 +181,15 @@ def check_our_files(): validate(fn) # Django templates are pretty messy now, so we do minimal checking. - templates = sorted([fn for fn in git_files if fn.endswith('.html') and 'templates' in fn]) + templates = [fn for fn in git_files if fn.endswith('.html')] def ok(fn): + if 'templates' not in fn: return False if 'api.html' in fn: return False if 'base.html' in fn: return False return True - templates = list(filter(ok, templates)) + templates = sorted(list(filter(ok, templates))) assert len(templates) >= 10 # sanity check that we are actually doing work