mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 20:31:27 -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
|
@ -117,7 +117,9 @@ EXAMPLES = '''
|
|||
|
||||
import base64
|
||||
import socket
|
||||
import urllib
|
||||
|
||||
from ansible.module_utils.six.moves.urllib.parse import urlencode
|
||||
|
||||
|
||||
class netscaler(object):
|
||||
|
||||
|
@ -129,7 +131,7 @@ class netscaler(object):
|
|||
def http_request(self, api_endpoint, data_json={}):
|
||||
request_url = self._nsc_protocol + '://' + self._nsc_host + self._nitro_base_url + api_endpoint
|
||||
|
||||
data_json = urllib.urlencode(data_json)
|
||||
data_json = urlencode(data_json)
|
||||
if not len(data_json):
|
||||
data_json = None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue