From 3fdf15fa8a01bcac2c32f88dd444f16ac1b156b2 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sat, 11 May 2013 17:22:56 -0400 Subject: [PATCH] template code fixes for 'make pep8' --- lib/ansible/utils/template.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/ansible/utils/template.py b/lib/ansible/utils/template.py index 90a86c20c1d..dff37e3f17c 100644 --- a/lib/ansible/utils/template.py +++ b/lib/ansible/utils/template.py @@ -30,24 +30,26 @@ import datetime import pwd class Globals(object): + FILTERS = None + def __init__(self): pass def _get_filters(): - ''' return filter plugin instances ''' + ''' return filter plugin instances ''' - if Globals.FILTERS is not None: - return Globals.FILTERS + if Globals.FILTERS is not None: + return Globals.FILTERS - from ansible import utils - plugins = [ x for x in utils.plugins.filter_loader.all()] - filters = {} - for fp in plugins: - filters.update(fp.filters()) - Globals.FILTERS = filters + from ansible import utils + plugins = [ x for x in utils.plugins.filter_loader.all()] + filters = {} + for fp in plugins: + filters.update(fp.filters()) + Globals.FILTERS = filters - return Globals.FILTERS + return Globals.FILTERS def _get_extensions(): ''' return jinja2 extensions to load '''