From 2b6cd72037911ac45bf062c22d9b35ef22d93189 Mon Sep 17 00:00:00 2001 From: "Dr. Peter Poeml" Date: Tue, 30 May 2006 11:44:06 +0000 Subject: [PATCH] set User-agent --- osc/core.py | 1 + 1 file changed, 1 insertion(+) diff --git a/osc/core.py b/osc/core.py index fe97d098..8b14f49a 100755 --- a/osc/core.py +++ b/osc/core.py @@ -528,6 +528,7 @@ def init_basicauth(): # create the AuthHandler opener = urllib2.build_opener(authhandler) + opener.addheaders = [('User-agent', 'osc/%s' % __version__)] urllib2.install_opener(opener) # All calls to urllib2.urlopen will now use our handler