Skip to content

Commit

Permalink
Merge pull request #6588 from vrutkovs/remove-ansible-compat-six
Browse files Browse the repository at this point in the history
Don't use from ansible.module_utils.six as its no longer available in Ansible 2.4
  • Loading branch information
sdodson authored Jan 17, 2018
2 parents 6c6529d + adb0ce3 commit 2e1a132
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
11 changes: 4 additions & 7 deletions roles/lib_utils/filter_plugins/oo_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@
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:
Expand Down
6 changes: 1 addition & 5 deletions roles/lib_utils/filter_plugins/openshift_master.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
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

Expand Down
6 changes: 1 addition & 5 deletions utils/src/ooinstall/ansible_plugins/facts_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
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
Expand Down

0 comments on commit 2e1a132

Please sign in to comment.