1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-14 17:46:17 +01:00

Merge branch 'fix_name_display' of https://github.com/lethliel/osc

Old keyring versions of the KeyringBackend class have no name method (the
name method was added in 2016). In this case, the class name is used as the
backend name.
This commit is contained in:
Marcus Huewe 2020-02-14 09:52:20 +01:00
commit 5185026084

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'