From a1bb23b8abec1e700407534ce31ded5dbe077d0e Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Fri, 15 Apr 2016 14:53:11 -0300 Subject: Fix use of JSON inventory vars with raw booleans. Thought this was fixed in recent patch but somehow backed out a critical change to the isinstance, we need to check for basestring to also have this work with unicode strings. --- roles/openshift_facts/library/openshift_facts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'roles') diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index 9218e12ae..54b1d9e75 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -1154,7 +1154,7 @@ def merge_facts(orig, new, additive_facts_to_overwrite, protected_facts_to_overw if key in inventory_json_facts: # Watchout for JSON facts that sometimes load as strings. # (can happen if the JSON contains a boolean) - if isinstance(new[key], str): + if isinstance(new[key], basestring): facts[key] = yaml.safe_load(new[key]) else: facts[key] = copy.deepcopy(new[key]) -- cgit v1.2.3