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
>>> bus = secretstorage.dbus_init()
>>> item_path = '/not/existing/path'
>>> try:
...     item = secretstorage.Item(bus, item_path)
... except secretstorage.ItemNotFoundException:
...     print('Item not found!')
... 
Item not found!

Also, create_collection() may raise this exception when a prompt was dismissed during creating the collection.

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.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.