mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Use the six import for urlsplit instead of importing directly. (#3902)
Fixes https://github.com/ansible/ansible/issues/16191
This commit is contained in:
parent
513c3bf287
commit
48f096b52c
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue