diff options
author | OpenShift Bot <eparis+openshiftbot@redhat.com> | 2017-04-04 09:20:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-04 09:20:42 -0500 |
commit | 7496b1235f72bd4241e4917f50df722174bf90fa (patch) | |
tree | 1fd7d3adf2c6befbef794d23ea3a92f0b6ce82e3 /roles | |
parent | 68b31569f7867afd67915098712cc832df95e59d (diff) | |
parent | 203630f47e6d06e5575a9e3bb4db76cb12ead936 (diff) | |
download | openshift-7496b1235f72bd4241e4917f50df722174bf90fa.tar.gz openshift-7496b1235f72bd4241e4917f50df722174bf90fa.tar.bz2 openshift-7496b1235f72bd4241e4917f50df722174bf90fa.tar.xz openshift-7496b1235f72bd4241e4917f50df722174bf90fa.zip |
Merge pull request #3808 from mtnbikenc/unicode-decode
Merged by openshift-bot
Diffstat (limited to 'roles')
-rw-r--r-- | roles/openshift_master_facts/filter_plugins/openshift_master.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/roles/openshift_master_facts/filter_plugins/openshift_master.py b/roles/openshift_master_facts/filter_plugins/openshift_master.py index 01806c97f..e570392ff 100644 --- a/roles/openshift_master_facts/filter_plugins/openshift_master.py +++ b/roles/openshift_master_facts/filter_plugins/openshift_master.py @@ -14,9 +14,12 @@ from distutils.version import LooseVersion # pylint: disable=no-name-in-module, from ansible import errors from ansible.parsing.yaml.dumper import AnsibleDumper from ansible.plugins.filter.core import to_bool as ansible_bool -# pylint import-error disabled because pylint cannot find the package -# when installed in a virtualenv -from ansible.compat.six import string_types # pylint: disable=no-name-in-module,import-error + +# ansible.compat.six goes away with Ansible 2.4 +try: + from ansible.compat.six import string_types, u +except ImportError: + from ansible.module_utils.six import string_types, u import yaml @@ -490,10 +493,10 @@ class FilterModule(object): idp_list.append(idp_inst) IdentityProviderBase.validate_idp_list(idp_list, openshift_version, deployment_type) - return yaml.dump([idp.to_dict() for idp in idp_list], - allow_unicode=True, - default_flow_style=False, - Dumper=AnsibleDumper) + return u(yaml.dump([idp.to_dict() for idp in idp_list], + allow_unicode=True, + default_flow_style=False, + Dumper=AnsibleDumper)) @staticmethod def validate_pcs_cluster(data, masters=None): |