1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-26 06:46:13 +01:00

set User-agent

This commit is contained in:
Dr. Peter Poeml 2006-05-30 11:44:06 +00:00
parent 537d6b62cc
commit 2b6cd72037

View File

@ -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