1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

knocked down the log method when fetching a page is problematic

this has caused quite a bit of confusion by Pinax users thinking the 404s are
errors. in most cases the 404s are harmless and don't prevent the installation
or location of a package.

if there is cause for concern in this i recommend to output something once
*all* pages have been hit and all produced some sort of error.
This commit is contained in:
Brian Rosner 2009-08-07 01:20:27 -06:00
parent f3927deefe
commit ec73362a76

6
pip.py
View file

@ -2335,11 +2335,11 @@ class HTMLPage(object):
except (urllib2.HTTPError, urllib2.URLError, socket.timeout, socket.error), e:
desc = str(e)
if isinstance(e, socket.timeout):
log_meth = logger.warn
log_meth = logger.info
level =1
desc = 'timed out'
elif isinstance(e, urllib2.URLError):
log_meth = logger.warn
log_meth = logger.info
if hasattr(e, 'reason') and isinstance(e.reason, socket.timeout):
desc = 'timed out'
level = 1
@ -2350,7 +2350,7 @@ class HTMLPage(object):
log_meth = logger.info
level = 2
else:
log_meth = logger.warn
log_meth = logger.info
level = 1
log_meth('Could not fetch URL %s: %s' % (link, desc))
log_meth('Will skip URL %s when looking for download links for %s' % (link.url, req))