aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/package_index.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-03-07 16:02:03 -0500
committerGitHub <noreply@github.com>2020-03-07 16:02:03 -0500
commit8a821dd9f2c2aa2b059543e86ede2cb0b4daae5c (patch)
treef636897e5dd300269882da3ec359d490ed53aee6 /setuptools/package_index.py
parent25edd1951d8d44c34578c926f5c20ed3d452587b (diff)
parentb2ab6f7c90b4daf5c05f08be230f329e8cb2f8e2 (diff)
downloadexternal_python_setuptools-8a821dd9f2c2aa2b059543e86ede2cb0b4daae5c.tar.gz
external_python_setuptools-8a821dd9f2c2aa2b059543e86ede2cb0b4daae5c.tar.bz2
external_python_setuptools-8a821dd9f2c2aa2b059543e86ede2cb0b4daae5c.zip
Merge pull request #1894 from ataylor284/bad-auth-message
Add info message on package index auth error
Diffstat (limited to 'setuptools/package_index.py')
-rw-r--r--setuptools/package_index.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 82eb4516..7a802413 100644
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -349,6 +349,8 @@ class PackageIndex(Environment):
f = self.open_url(url, tmpl % url)
if f is None:
return
+ if isinstance(f, urllib.error.HTTPError) and f.code == 401:
+ self.info("Authentication error: %s" % f.msg)
self.fetched_urls[f.url] = True
if 'html' not in f.headers.get('content-type', '').lower():
f.close() # not html, we can't process it