Fixed import of urlencode and pathname2url from urllib for python3 (#24424)

This commit is contained in:
Michael 2017-05-19 17:22:16 +00:00 committed by Matt Martz
commit b65ebf3519
26 changed files with 66 additions and 69 deletions

View file

@ -88,7 +88,7 @@ EXAMPLES = '''
revision: '1.0'
'''
import urllib
from ansible.module_utils.six.moves.urllib.parse import urlencode
# ===========================================
# Module execution.
@ -135,7 +135,7 @@ def main():
# Send the data to NewRelic
url = "https://rpm.newrelic.com/deployments.xml"
data = urllib.urlencode(params)
data = urlencode(params)
headers = {
'x-api-key': module.params["token"],
}