defend against keyring errors

on certain settings, like a virtualenv with symlinks, I'm getting
errors after a suspend, related to a error to connect to the dbus
socket.

wrapping all of it in a conditional we avoid that kind of error.