mirror of
https://github.com/openSUSE/osc.git
synced 2024-09-20 17:26:15 +02:00
Merge branch 'master' of https://github.com/andreas-schwab/osc
Get rid of completely bogus appname usage in KeyringCredentialsManager.
This commit is contained in:
commit
42c0d4b71e
@ -163,10 +163,6 @@ class TransientDescriptor(AbstractCredentialsManagerDescriptor):
|
||||
|
||||
|
||||
class KeyringCredentialsManager(AbstractCredentialsManager):
|
||||
def __init__(self, cp, options, appname='osc'):
|
||||
super(self.__class__, self).__init__(cp, options)
|
||||
self._appname = appname
|
||||
|
||||
def _process_options(self, options):
|
||||
if options is None:
|
||||
raise RuntimeError('options may not be None')
|
||||
@ -184,17 +180,17 @@ class KeyringCredentialsManager(AbstractCredentialsManager):
|
||||
|
||||
def get_password(self, url, user, defer=True):
|
||||
self._load_backend()
|
||||
return keyring.get_password(self._appname, user)
|
||||
return keyring.get_password(urlsplit(url)[1], user)
|
||||
|
||||
def set_password(self, url, user, password):
|
||||
self._load_backend()
|
||||
keyring.set_password(self._appname, user, password)
|
||||
keyring.set_password(urlsplit(url)[1], user, password)
|
||||
config_value = self._qualified_name() + ':' + self._backend_cls_name
|
||||
self._cp.set(url, self.config_entry, config_value)
|
||||
|
||||
def delete_password(self, url, user):
|
||||
self._load_backend()
|
||||
keyring.delete_password(self._appname, user)
|
||||
keyring.delete_password(urlsplit(url)[1], user)
|
||||
|
||||
|
||||
class KeyringCredentialsDescriptor(AbstractCredentialsManagerDescriptor):
|
||||
|
Loading…
Reference in New Issue
Block a user