o a@sddlmZddlZddlmZddlmZddlmZddl m Z m Z m Z m Z z ddlZddlmZWney=Yn eyEYnweeZGdd d eZdS) )closingN) properties)KeyringBackend)SimpleCredential) InitErrorPasswordDeleteErrorExceptionRaisedContext KeyringLockedc@sVeZdZdZdZejeddZddZ ddZ d d Z d d Z d dZ ddZdS)KeyringzSecret Service KeyringzPython keyring libraryc Cst }tjWdn1swY|rtdtjdkr%tdz$tt}t|s6tdWdWdS1sBwYWdStj y\}ztd|d}~ww)NzSecretStorage required)rz#SecretStorage 3.2 or newer requiredzJThe Secret Service daemon is neither running nor activatable through D-Busz&Unable to initialize SecretService: %s) r secretstorage__name__ RuntimeError__version_tuple__r dbus_initcheck_service_availability exceptionsSecretStorageException)clsexc connectioner@/usr/lib/python3/dist-packages/keyring/backends/SecretService.pyprioritys,    zKeyring.priorityc Cs|t}zt|drt||j}nt|}Wntjy+}ztd|d}~ww| r<| | rs