From bddeebcd9493302df34187b9f45742065e6b7593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Thu, 21 Jan 2010 21:59:33 +0000 Subject: [PATCH] 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 --- AbstractCheck.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AbstractCheck.py b/AbstractCheck.py index 991f8cc7..342f352d 100644 --- a/AbstractCheck.py +++ b/AbstractCheck.py @@ -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)