mirror of
https://github.com/liberatedsystems/openCom-Companion.git
synced 2024-11-24 14:20:37 +01:00
20 lines
426 B
Python
20 lines
426 B
Python
try:
|
|
import keyring
|
|
except ImportError:
|
|
raise NotImplementedError()
|
|
|
|
from plyer.facades import Keystore
|
|
|
|
|
|
class OSXKeystore(Keystore):
|
|
|
|
def _set_key(self, servicename, key, value, **kwargs):
|
|
keyring.set_password(servicename, key, value)
|
|
|
|
def _get_key(self, servicename, key, **kwargs):
|
|
return keyring.get_password(servicename, key)
|
|
|
|
|
|
def instance():
|
|
return OSXKeystore()
|