Use our own User-Agent in urllib2 requests.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1713 9bc8b190-ac0f-0410-8968-dc7d1f502856
This commit is contained in:
parent
65179dc1ba
commit
bddeebcd94
|
@ -56,6 +56,8 @@ class AbstractCheck:
|
|||
res = err = None
|
||||
try:
|
||||
opener = urllib2.build_opener(_HeadRedirectHandler())
|
||||
opener.addheaders = [('User-Agent',
|
||||
'rpmlint/%s' % Config.__version__)]
|
||||
res = opener.open(_HeadRequest(url))
|
||||
except Exception, e:
|
||||
errstr = str(e) or repr(e) or type(e)
|
||||
|
|
Loading…
Reference in New Issue