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

@ -25,7 +25,6 @@
#
# { "groups": ["utility", "databases"], "a": false, "b": true }
import urllib
try:
import json
except ImportError:
@ -35,6 +34,7 @@ import sys
from optparse import OptionParser
from six import iteritems
from six.moves.urllib.parse import urlencode
from ansible.module_utils.urls import open_url
@ -97,7 +97,7 @@ class ProxmoxAPI(object):
def auth(self):
request_path = '{}api2/json/access/ticket'.format(self.options.url)
request_params = urllib.urlencode({
request_params = urlencode({
'username': self.options.username,
'password': self.options.password,
})