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
|
@ -69,7 +69,7 @@ EXAMPLES = '''
|
|||
message=deployed {{ target }}
|
||||
'''
|
||||
|
||||
import urllib
|
||||
from ansible.module_utils.six.moves.urllib.parse import urlencode
|
||||
|
||||
BASE_URL = 'https://grove.io/api/notice/%s/'
|
||||
|
||||
|
@ -85,7 +85,7 @@ def do_notify_grove(module, channel_token, service, message, url=None, icon_url=
|
|||
if icon_url is not None:
|
||||
my_data['icon_url'] = icon_url
|
||||
|
||||
data = urllib.urlencode(my_data)
|
||||
data = urlencode(my_data)
|
||||
response, info = fetch_url(module, my_url, data=data)
|
||||
if info['status'] != 200:
|
||||
module.fail_json(msg="failed to send notification: %s" % info['msg'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue