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:
parent
537d6b62cc
commit
2b6cd72037
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user