summaryrefslogtreecommitdiffstats
path: root/contrib/inventory/consul_io.py
diff options
context:
space:
mode:
authorFrançois Scala <github@arcenik.net>2017-10-10 05:18:09 +0200
committerToshio Kuratomi <a.badger@gmail.com>2017-10-10 05:18:09 +0200
commitaade5234a90bd60b8131f2f97bd43d1d1c3174e7 (patch)
treef26b01781ff326db8d7aa5034f220d46ec0e0f0d /contrib/inventory/consul_io.py
parentupdated changelog for win_become with service accounts (diff)
downloadansible-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/inventory/consul_io.py')
-rwxr-xr-xcontrib/inventory/consul_io.py5
1 files changed, 1 insertions, 4 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