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

@ -135,7 +135,8 @@ RETURN = '''
import socket
import types
import urllib
from ansible.module_utils.six.moves.urllib.parse import urlencode
HAS_LIB_JSON = True
try:
@ -179,8 +180,8 @@ class LogicMonitor(object):
and return the response"""
self.module.debug("Running LogicMonitor.rpc")
param_str = urllib.urlencode(params)
creds = urllib.urlencode(
param_str = urlencode(params)
creds = urlencode(
{"c": self.company,
"u": self.user,
"p": self.password})