From 5a9e826647f93dee029757be167b0f77ff08d229 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Thu, 28 Apr 2016 20:39:35 +0200 Subject: [PATCH] Rename function bool() as it is a Python built-in function (#15651) --- lib/ansible/plugins/filter/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/plugins/filter/core.py b/lib/ansible/plugins/filter/core.py index b413dca4ea6..0529e87b037 100644 --- a/lib/ansible/plugins/filter/core.py +++ b/lib/ansible/plugins/filter/core.py @@ -106,7 +106,7 @@ def to_nice_json(a, *args, **kw): # Fallback to the to_json filter return to_json(a, *args, **kw) -def bool(a): +def to_bool(a): ''' return a bool for the arg ''' if a is None or type(a) == bool: return a @@ -431,7 +431,7 @@ class FilterModule(object): 'win_splitdrive': partial(unicode_wrap, ntpath.splitdrive), # value as boolean - 'bool': bool, + 'bool': to_bool, # quote string for shell usage 'quote': quote,