New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #3569 inability to load credentials from .netrc files #3715

Merged
merged 2 commits into from May 26, 2016
Jump to file or symbol
Failed to load files and symbols.
+6 −4
Diff settings

Always

Just for now

Viewing a subset of changes. View all
Prev

Removed debug line and fixed flake8

  • Loading branch information...
ssbarnea committed May 24, 2016
commit d57336d466b1eddb272a58de94f1779b50a9c5ed
View
@@ -200,12 +200,13 @@ def parse_credentials(self, netloc):
return None, None
def __nonzero__(self):
# needed in order to evalue authentication object to False when we have no credentials, prevents failure to load .netrc files
print("FATAL: %s" % self.passwords)
return bool(self.passwords)
# needed in order to evalue authentication object to False when we have
# no credentials, prevents failure to load .netrc files
return bool(self.passwords)
def __bool__(self):
return self.__nonzero__()
return self.__nonzero__()
class LocalFSAdapter(BaseAdapter):
@@ -756,6 +757,7 @@ class PipXmlrpcTransport(xmlrpc_client.Transport):
"""Provide a `xmlrpclib.Transport` implementation via a `PipSession`
object.
"""
def __init__(self, index_url, session, use_datetime=False):
xmlrpc_client.Transport.__init__(self, use_datetime)
index_parts = urllib_parse.urlparse(index_url)
ProTip! Use n and p to navigate between commits in a pull request.