mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Fixed import of urlencode and pathname2url from urllib for python3 (#24424)
This commit is contained in:
@@ -65,7 +65,7 @@ EXAMPLES = '''
|
||||
delegate_to: localhost
|
||||
'''
|
||||
|
||||
import urllib
|
||||
from ansible.module_utils.six.moves.urllib.parse import urlencode
|
||||
|
||||
|
||||
class Pushover(object):
|
||||
@@ -87,7 +87,7 @@ class Pushover(object):
|
||||
token=self.token,
|
||||
priority=priority,
|
||||
message=msg)
|
||||
data = urllib.urlencode(options)
|
||||
data = urlencode(options)
|
||||
|
||||
headers = { "Content-type": "application/x-www-form-urlencoded"}
|
||||
r, info = fetch_url(self.module, url, method='POST', data=data, headers=headers)
|
||||
|
||||
Reference in New Issue
Block a user