Commit 75345928 authored by Jason R. Coombs's avatar Jason R. Coombs

Renamed class for proper capitalization and for clarity.

parent 117a8a57
...@@ -934,14 +934,14 @@ class Credential(object): ...@@ -934,14 +934,14 @@ class Credential(object):
def __str__(self): def __str__(self):
return '%(username)s:%(password)s' % vars(self) return '%(username)s:%(password)s' % vars(self)
class PyPirc(ConfigParser.ConfigParser): class PyPIConfig(ConfigParser.ConfigParser):
def __init__(self): def __init__(self):
""" """
Load from ~/.pypirc Load from ~/.pypirc
""" """
defaults = dict.fromkeys(['username', 'password', 'repository'], '') defaults = dict.fromkeys(['username', 'password', 'repository'], '')
super(PyPirc, self).__init__(defaults) super(PyPIConfig, self).__init__(defaults)
rc = os.path.join(os.path.expanduser('~'), '.pypirc') rc = os.path.join(os.path.expanduser('~'), '.pypirc')
if os.path.exists(rc): if os.path.exists(rc):
...@@ -989,7 +989,7 @@ def open_with_auth(url, opener=urllib2.urlopen): ...@@ -989,7 +989,7 @@ def open_with_auth(url, opener=urllib2.urlopen):
auth = None auth = None
if not auth: if not auth:
cred = PyPirc().find_credential(url) cred = PyPIConfig().find_credential(url)
if cred: if cred:
auth = str(cred) auth = str(cred)
log.info('Authentication found for URL: %s' % url) log.info('Authentication found for URL: %s' % url)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment