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
|
@ -109,7 +109,7 @@ EXAMPLES = '''
|
|||
# =======================================
|
||||
# twilio module support methods
|
||||
#
|
||||
import urllib
|
||||
from ansible.module_utils.six.moves.urllib.parse import urlencode
|
||||
|
||||
|
||||
def post_twilio_api(module, account_sid, auth_token, msg, from_number,
|
||||
|
@ -121,7 +121,7 @@ def post_twilio_api(module, account_sid, auth_token, msg, from_number,
|
|||
data = {'From':from_number, 'To':to_number, 'Body':msg}
|
||||
if media_url:
|
||||
data['MediaUrl'] = media_url
|
||||
encoded_data = urllib.urlencode(data)
|
||||
encoded_data = urlencode(data)
|
||||
|
||||
headers = {'User-Agent': AGENT,
|
||||
'Content-type': 'application/x-www-form-urlencoded',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue