mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-06 00:14:02 -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
|
@ -296,6 +296,7 @@ state:
|
|||
|
||||
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, url_argument_spec
|
||||
from ansible.module_utils._text import to_native
|
||||
import base64
|
||||
|
@ -304,7 +305,6 @@ import json
|
|||
import os
|
||||
import tempfile
|
||||
import time
|
||||
import urllib
|
||||
|
||||
|
||||
class JenkinsPlugin(object):
|
||||
|
@ -435,7 +435,7 @@ class JenkinsPlugin(object):
|
|||
'script': install_script
|
||||
}
|
||||
script_data.update(self.crumb)
|
||||
data = urllib.urlencode(script_data)
|
||||
data = urlencode(script_data)
|
||||
|
||||
# Send the installation request
|
||||
r = self._get_url_data(
|
||||
|
@ -723,7 +723,7 @@ class JenkinsPlugin(object):
|
|||
def _pm_query(self, action, msg):
|
||||
url = "%s/pluginManager/plugin/%s/%s" % (
|
||||
self.params['url'], self.params['name'], action)
|
||||
data = urllib.urlencode(self.crumb)
|
||||
data = urlencode(self.crumb)
|
||||
|
||||
# Send the request
|
||||
self._get_url_data(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue