From 48f096b52c7b766f5594bc7d3b94c0ba57fe85fd Mon Sep 17 00:00:00 2001 From: jctanner Date: Thu, 9 Jun 2016 13:25:17 -0400 Subject: [PATCH] Use the six import for urlsplit instead of importing directly. (#3902) Fixes https://github.com/ansible/ansible/issues/16191 --- lib/ansible/modules/network/basics/get_url.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/network/basics/get_url.py b/lib/ansible/modules/network/basics/get_url.py index 6404676ed8..d79b24dc0a 100644 --- a/lib/ansible/modules/network/basics/get_url.py +++ b/lib/ansible/modules/network/basics/get_url.py @@ -182,13 +182,13 @@ EXAMPLES=''' get_url: url="file:///tmp/afile.txt" dest=/tmp/afilecopy.txt ''' -import urlparse +from ansible.module_utils.six.moves.urllib.parse import urlsplit # ============================================================== # url handling def url_filename(url): - fn = os.path.basename(urlparse.urlsplit(url)[2]) + fn = os.path.basename(urlsplit(url)[2]) if fn == '': return 'index.html' return fn