Possible exceptions

All secretstorage functions may raise various exceptions when something goes wrong. All exceptions derive from base SecretStorageException class.

exception secretstorage.exceptions.ItemNotFoundException[source]

Raised when an item does not exist or has been deleted. Example of handling:

>>> import secretstorage
>>> connection = secretstorage.dbus_init()
>>> item_path = '/not/existing/path'
>>> try:
...     item = secretstorage.Item(connection, item_path)
... except secretstorage.ItemNotFoundException:
...     print('Item not found!')
...
Item not found!
exception secretstorage.exceptions.LockedException[source]

Raised when an action cannot be performed because the collection is locked. Use is_locked() to check if the collection is locked, and unlock() to unlock it.

exception secretstorage.exceptions.PromptDismissedException[source]

Raised when a prompt was dismissed by the user.

New in version 3.1.

exception secretstorage.exceptions.SecretServiceNotAvailableException[source]

Raised by Item or Collection constructors, or by other functions in the secretstorage.collection module, when the Secret Service API is not available.

exception secretstorage.exceptions.SecretStorageException[source]

All exceptions derive from this class.