1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-09 22:36:14 +01:00

fix list of backends for old python-keyring

old python-keyring classes have no name method.
This is used instead:

return self._keyring_backend.__class__.__name__
This commit is contained in:
lethliel 2020-02-14 09:35:07 +01:00
parent 32859d6803
commit 6a20fd8bf5

View File

@ -199,7 +199,10 @@ class KeyringCredentialsDescriptor(AbstractCredentialsManagerDescriptor):
self._keyring_backend = keyring_backend
def name(self):
return self._keyring_backend.name
if hasattr(self._keyring_backend, 'name'):
return self._keyring_backend.name
else:
return self._keyring_backend.__class__.__name__
def description(self):
return 'Backend provided by python-keyring'