mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
Fixed import of urlencode and pathname2url from urllib for python3 (#24424)
This commit is contained in:
parent
98a8b967d2
commit
b65ebf3519
26 changed files with 66 additions and 69 deletions
|
@ -82,10 +82,9 @@ EXAMPLES = '''
|
|||
comment: Test Deploy
|
||||
'''
|
||||
|
||||
import urllib
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.pycompat24 import get_exception
|
||||
from ansible.module_utils.six.moves.urllib.parse import urlencode
|
||||
from ansible.module_utils.urls import fetch_url
|
||||
|
||||
|
||||
|
@ -129,7 +128,7 @@ def main():
|
|||
url = module.params.get('url')
|
||||
|
||||
try:
|
||||
data = urllib.urlencode(params)
|
||||
data = urlencode(params)
|
||||
response, info = fetch_url(module, url, data=data)
|
||||
except Exception:
|
||||
e = get_exception()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue