diff options
author | François Scala <github@arcenik.net> | 2017-10-10 05:18:09 +0200 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2017-10-10 05:18:09 +0200 |
commit | aade5234a90bd60b8131f2f97bd43d1d1c3174e7 (patch) | |
tree | f26b01781ff326db8d7aa5034f220d46ec0e0f0d /contrib | |
parent | updated changelog for win_become with service accounts (diff) | |
download | ansible-aade5234a90bd60b8131f2f97bd43d1d1c3174e7.tar.xz ansible-aade5234a90bd60b8131f2f97bd43d1d1c3174e7.zip |
Fix urlparse import for Python3 (#31240)
* Fix urlparse import for Python3 in
* contrib/inventory/consul_io.py
* contrib/inventory/rudder.py
* contrib/inventory/windows_azure.py
* lib/ansible/module_utils/known_hosts.py
* lib/ansible/modules/cloud/centurylink/clc_firewall_policy.py
* lib/ansible/modules/cloud/docker/_docker.py
* lib/ansible/modules/cloud/ovirt/ovirt_disk.py
* lib/ansible/plugins/action/ce_template.py
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/inventory/consul_io.py | 5 | ||||
-rwxr-xr-x | contrib/inventory/rudder.py | 8 | ||||
-rwxr-xr-x | contrib/inventory/windows_azure.py | 2 |
3 files changed, 4 insertions, 11 deletions
diff --git a/contrib/inventory/consul_io.py b/contrib/inventory/consul_io.py index 7dfffb59eb..8f3a104fdf 100755 --- a/contrib/inventory/consul_io.py +++ b/contrib/inventory/consul_io.py @@ -473,10 +473,7 @@ class ConsulConfig(dict): scheme = 'http' if hasattr(self, 'url'): - try: - from urlparse import urlparse - except ImportError: - from urllib.parse import urlparse + from ansible.module_utils.six.moves.urllib.parse import urlparse o = urlparse(self.url) if o.hostname: host = o.hostname diff --git a/contrib/inventory/rudder.py b/contrib/inventory/rudder.py index 5cf16c9761..50f1caeaaa 100755 --- a/contrib/inventory/rudder.py +++ b/contrib/inventory/rudder.py @@ -56,12 +56,8 @@ import argparse import six import httplib2 as http from time import time -from six.moves import configparser - -try: - from urlparse import urlparse -except ImportError: - from urllib.parse import urlparse +from ansible.module_utils.six.moves import configparser +from ansible.module_utils.six.moves.urllib.parse import urlparse try: import json diff --git a/contrib/inventory/windows_azure.py b/contrib/inventory/windows_azure.py index deb17b15f3..5398b54032 100755 --- a/contrib/inventory/windows_azure.py +++ b/contrib/inventory/windows_azure.py @@ -39,7 +39,7 @@ import re import sys import argparse import os -from urlparse import urlparse +from ansible.module_utils.six.moves.urllib.parse import urlparse from time import time try: import json |