mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Python2.4 compat fix
This commit is contained in:
@@ -652,7 +652,7 @@ def open_url(url, data=None, headers=None, method=None, use_proxy=True,
|
|||||||
if headers is None:
|
if headers is None:
|
||||||
headers = {}
|
headers = {}
|
||||||
|
|
||||||
headers["Authorization"] = "Basic {0}".format(base64.b64encode("{0}:{1}".format(username, password)))
|
headers["Authorization"] = "Basic %s" % base64.b64encode("%s:%s" % (username, password))
|
||||||
|
|
||||||
if not use_proxy:
|
if not use_proxy:
|
||||||
proxyhandler = urllib2.ProxyHandler({})
|
proxyhandler = urllib2.ProxyHandler({})
|
||||||
|
|||||||
Reference in New Issue
Block a user