summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2018-01-17 10:52:22 -0500
committerGitHub <noreply@github.com>2018-01-17 10:52:22 -0500
commit2e1a1328457315c0d434d5a0fe1660e07512f6bd (patch)
treea0efd99770819064d56e7cf272957e3ec02aadd3
parent6c6529d4f08b3b69ff166f05a526e572467dda01 (diff)
parentadb0ce309b92de60afd028a72e2e80cf165430b7 (diff)
downloadopenshift-2e1a1328457315c0d434d5a0fe1660e07512f6bd.tar.gz
openshift-2e1a1328457315c0d434d5a0fe1660e07512f6bd.tar.bz2
openshift-2e1a1328457315c0d434d5a0fe1660e07512f6bd.tar.xz
openshift-2e1a1328457315c0d434d5a0fe1660e07512f6bd.zip
Merge pull request #6588 from vrutkovs/remove-ansible-compat-six
Don't use from ansible.module_utils.six as its no longer available in Ansible 2.4
-rw-r--r--roles/lib_utils/filter_plugins/oo_filters.py11
-rw-r--r--roles/lib_utils/filter_plugins/openshift_master.py6
-rw-r--r--utils/src/ooinstall/ansible_plugins/facts_callback.py6
3 files changed, 6 insertions, 17 deletions
diff --git a/roles/lib_utils/filter_plugins/oo_filters.py b/roles/lib_utils/filter_plugins/oo_filters.py
index fc14b5633..9f73510c4 100644
--- a/roles/lib_utils/filter_plugins/oo_filters.py
+++ b/roles/lib_utils/filter_plugins/oo_filters.py
@@ -21,13 +21,10 @@ import yaml
from ansible import errors
from ansible.parsing.yaml.dumper import AnsibleDumper
-# ansible.compat.six goes away with Ansible 2.4
-try:
- from ansible.compat.six import string_types, u
- from ansible.compat.six.moves.urllib.parse import urlparse
-except ImportError:
- from ansible.module_utils.six import string_types, u
- from ansible.module_utils.six.moves.urllib.parse import urlparse
+# pylint: disable=import-error,no-name-in-module
+from ansible.module_utils.six import string_types, u
+# pylint: disable=import-error,no-name-in-module
+from ansible.module_utils.six.moves.urllib.parse import urlparse
HAS_OPENSSL = False
try:
diff --git a/roles/lib_utils/filter_plugins/openshift_master.py b/roles/lib_utils/filter_plugins/openshift_master.py
index ff15f693b..e67b19c28 100644
--- a/roles/lib_utils/filter_plugins/openshift_master.py
+++ b/roles/lib_utils/filter_plugins/openshift_master.py
@@ -10,11 +10,7 @@ from ansible import errors
from ansible.parsing.yaml.dumper import AnsibleDumper
from ansible.plugins.filter.core import to_bool as ansible_bool
-# 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
+from ansible.module_utils.six import string_types, u
import yaml
diff --git a/utils/src/ooinstall/ansible_plugins/facts_callback.py b/utils/src/ooinstall/ansible_plugins/facts_callback.py
index 433e29dde..6251cd22b 100644
--- a/utils/src/ooinstall/ansible_plugins/facts_callback.py
+++ b/utils/src/ooinstall/ansible_plugins/facts_callback.py
@@ -7,11 +7,7 @@ import yaml
from ansible.plugins.callback import CallbackBase
from ansible.parsing.yaml.dumper import AnsibleDumper
-# ansible.compat.six goes away with Ansible 2.4
-try:
- from ansible.compat.six import u
-except ImportError:
- from ansible.module_utils.six import u
+from ansible.module_utils.six import u
# pylint: disable=super-init-not-called