From 4a3916bd46bf6a5dd24f2b3991007816430a3523 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 --- network/basics/get_url.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/network/basics/get_url.py b/network/basics/get_url.py index 3d180f635ec..83e6b130519 100644 --- a/network/basics/get_url.py +++ b/network/basics/get_url.py @@ -183,13 +183,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