mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -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
|
@ -96,13 +96,13 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
import atexit
|
||||
import urllib
|
||||
import mmap
|
||||
import errno
|
||||
import socket
|
||||
|
||||
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 open_url
|
||||
|
||||
def vmware_path(datastore, datacenter, path):
|
||||
|
@ -116,7 +116,7 @@ def vmware_path(datastore, datacenter, path):
|
|||
params = dict( dsName = datastore )
|
||||
if datacenter:
|
||||
params["dcPath"] = datacenter
|
||||
params = urllib.urlencode(params)
|
||||
params = urlencode(params)
|
||||
return "%s?%s" % (path, params)
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue