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
parent 98a8b967d2
commit b65ebf3519
26 changed files with 66 additions and 69 deletions

View file

@ -110,7 +110,7 @@ EXAMPLES = '''
tags: tag1,tag2,tag3
'''
import urllib
from ansible.module_utils.six.moves.urllib.parse import urlencode
# ===========================================
# Module execution.
@ -185,7 +185,7 @@ def main():
module.exit_json(changed=False)
# Send the data to Flowdock
data = urllib.urlencode(params)
data = urlencode(params)
response, info = fetch_url(module, url, data=data)
if info['status'] != 200:
module.fail_json(msg="unable to send msg: %s" % info['msg'])