diff --git a/lib/ansible/module_utils/lxd.py b/lib/ansible/module_utils/lxd.py index f3464c10e18..e3eb078729a 100644 --- a/lib/ansible/module_utils/lxd.py +++ b/lib/ansible/module_utils/lxd.py @@ -27,6 +27,9 @@ # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from ansible.module_utils.urls import generic_urlparse +from ansible.module_utils.six.moves.urllib.parse import urlparse + try: import json except ImportError: @@ -51,13 +54,6 @@ class UnixHTTPConnection(HTTPConnection): sock.connect(self.path) self.sock = sock -from ansible.module_utils.urls import generic_urlparse -try: - from urlparse import urlparse -except ImportError: - # Python 3 - from url.parse import urlparse - class LXDClientException(Exception): def __init__(self, msg, **kwargs): self.msg = msg