mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-28 23:46:13 +01:00
Fix typo in the password deletion codepath in conf.config_set_option
A password can be deleted via "osc config -d <apiurl> pass". Actually, if we really want to support password deletion, we should introduce a --delete-password option because the "pass" config option can be considered as an implementation detail, which we should not expose to our users.
This commit is contained in:
parent
7e23743239
commit
fd4d8d726a
@ -762,7 +762,7 @@ def config_set_option(section, opt, val=None, delete=False, update=True, creds_m
|
|||||||
elif delete and (cp.has_option(section, opt) or opt == 'pass'):
|
elif delete and (cp.has_option(section, opt) or opt == 'pass'):
|
||||||
if opt == 'pass':
|
if opt == 'pass':
|
||||||
creds_mgr = _get_credentials_manager(section, cp)
|
creds_mgr = _get_credentials_manager(section, cp)
|
||||||
user = _extract_user_compar(cp, section, creds_mgr)
|
user = _extract_user_compat(cp, section, creds_mgr)
|
||||||
creds_mgr.delete_password(section, user)
|
creds_mgr.delete_password(section, user)
|
||||||
else:
|
else:
|
||||||
cp.remove_option(section, opt)
|
cp.remove_option(section, opt)
|
||||||
|
Loading…
Reference in New Issue
Block a user