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
|
@ -140,7 +140,7 @@ EXAMPLES = '''
|
|||
# =======================================
|
||||
# sendgrid module support methods
|
||||
#
|
||||
import urllib
|
||||
from ansible.module_utils.six.moves.urllib.parse import urlencode
|
||||
|
||||
try:
|
||||
import sendgrid
|
||||
|
@ -157,7 +157,7 @@ def post_sendgrid_api(module, username, password, from_address, to_addresses,
|
|||
AGENT = "Ansible"
|
||||
data = {'api_user': username, 'api_key':password,
|
||||
'from':from_address, 'subject': subject, 'text': body}
|
||||
encoded_data = urllib.urlencode(data)
|
||||
encoded_data = urlencode(data)
|
||||
to_addresses_api = ''
|
||||
for recipient in to_addresses:
|
||||
if isinstance(recipient, unicode):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue