This commit is contained in:
Kenneth Reitz
2013-03-22 15:48:27 -04:00
parent 19d38d502f
commit 92f7478174
+1 -1
View File
@@ -399,7 +399,7 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
def prepare_auth(self, auth, url=''):
"""Prepares the given HTTP auth data."""
# If no Auth is explicitly provided, extract it from the URL.
# If no Auth is explicitly provided, extract it from the URL first.
if auth is None:
url_auth = get_auth_from_url(self.url)
auth = url_auth if any(url_auth) else None