mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 10:16:14 +01:00
if there are no credentials for the apisrv in use (which may be specified with
-A on the commandline), don't try to set up config['user'] with credentials.
This commit is contained in:
parent
734973a0bd
commit
e8899aa165
@ -264,8 +264,10 @@ def get_config(override_conffile = None,
|
||||
config['apiurl'] = config['scheme'] + '://' + config['apisrv']
|
||||
|
||||
# XXX unless config['user'] goes away (and is replaced with a handy function, or
|
||||
# config becomes an object, even better), set the global 'user' here as well:
|
||||
config['user'] = config['auth_dict'][config['apisrv']]['user']
|
||||
# config becomes an object, even better), set the global 'user' here as well,
|
||||
# provided that there _are_ credentials for the chosen apisrv:
|
||||
if config['apisrv'] in config['auth_dict'].keys():
|
||||
config['user'] = config['auth_dict'][config['apisrv']]['user']
|
||||
|
||||
# finally, initialize urllib2 for to use the credentials for Basic Authentication
|
||||
init_basicauth(config)
|
||||
|
Loading…
Reference in New Issue
Block a user