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:
commit
5185026084
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user