Issue #77 resolved

Should unlock the system’s key ring as needed

Simon Sapin avatarSimon Sapin created an issue


In Gnome 3.6, when the key ring is locked:

  • get_password() always returns None, even if the key ring has a matching password,
  • set_password() raises the same exception as in issue #69, reproduced below.

If the key ring is then unlocked through another application (eg. Empathy), everything starts working as expected.

Expected result: when the key ring is locked, the keyring module should have Gnome show the usual password prompt to unlock it.

Traceback for set_password():

  File "/usr/lib64/python2.7/site-packages/keyring/", line 42, in set_password
    _keyring_backend.set_password(service_name, username, password)
  File "/usr/lib64/python2.7/site-packages/keyring/", line 233, in set_password
  File "/usr/lib64/python2.7/site-packages/dbus/", line 70, in __call__
return self._proxy_method(*args, **keywords)
  File "/usr/lib64/python2.7/site-packages/dbus/", line 145, in __call__
  File "/usr/lib64/python2.7/site-packages/dbus/", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.Secret.Error.IsLocked: Cannot create an item in a locked collection
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.