summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2016-04-15 14:53:11 -0300
committerDevan Goodwin <dgoodwin@redhat.com>2016-04-15 15:05:54 -0300
commita1bb23b8abec1e700407534ce31ded5dbe077d0e (patch)
treea1c67530edefe9e24ac04058e059a48d47c0fc78 /roles
parentdbb94c4e5461780adb74e864e6b0919153b5ffe7 (diff)
downloadopenshift-a1bb23b8abec1e700407534ce31ded5dbe077d0e.tar.gz
openshift-a1bb23b8abec1e700407534ce31ded5dbe077d0e.tar.bz2
openshift-a1bb23b8abec1e700407534ce31ded5dbe077d0e.tar.xz
openshift-a1bb23b8abec1e700407534ce31ded5dbe077d0e.zip
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.
Diffstat (limited to 'roles')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py2
1 files changed, 1 insertions, 1 deletions
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])