mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 22:56:15 +01:00
Merge pull request #1188 from mig4/fix-delete-pass
Avoid crash when deleting a password
This commit is contained in:
commit
cd257dc15f
@ -246,7 +246,11 @@ class KeyringCredentialsManager(AbstractCredentialsManager):
|
||||
|
||||
def delete_password(self, url, user):
|
||||
self._load_backend()
|
||||
keyring.delete_password(urlsplit(url)[1], user)
|
||||
service = urlsplit(url)[1]
|
||||
data = keyring.get_password(service, user)
|
||||
if data is None:
|
||||
return
|
||||
keyring.delete_password(service, user)
|
||||
|
||||
|
||||
class KeyringCredentialsDescriptor(AbstractCredentialsManagerDescriptor):
|
||||
|
Loading…
Reference in New Issue
Block a user