diff --git a/lib/ansible/module_utils/urls.py b/lib/ansible/module_utils/urls.py index 86e92183ca..84f78f8d53 100644 --- a/lib/ansible/module_utils/urls.py +++ b/lib/ansible/module_utils/urls.py @@ -652,7 +652,7 @@ def open_url(url, data=None, headers=None, method=None, use_proxy=True, if headers is None: 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: proxyhandler = urllib2.ProxyHandler({})