diff options
author | Andrew Taylor <ataylor@redtoad.ca> | 2019-10-29 17:03:11 -0600 |
---|---|---|
committer | Andrew Taylor <ataylor@redtoad.ca> | 2019-10-29 17:03:11 -0600 |
commit | b2ab6f7c90b4daf5c05f08be230f329e8cb2f8e2 (patch) | |
tree | 15b3e4ca123b863697bd76d660c0aef998d92473 /setuptools/package_index.py | |
parent | a0fe403c141369defacf12dccbdc01634bbcb1da (diff) | |
download | external_python_setuptools-b2ab6f7c90b4daf5c05f08be230f329e8cb2f8e2.tar.gz external_python_setuptools-b2ab6f7c90b4daf5c05f08be230f329e8cb2f8e2.tar.bz2 external_python_setuptools-b2ab6f7c90b4daf5c05f08be230f329e8cb2f8e2.zip |
Add info message when authentication error encountered processing package index.
Diffstat (limited to 'setuptools/package_index.py')
-rw-r--r-- | setuptools/package_index.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py index f419d471..d9668e4e 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -348,6 +348,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 |