gnome-keyring Unexpected 'NoKeyringDaemonError'
- From: juan luis belmonte <jlbelmonte warp es>
- To: gnome-keyring-list gnome org
- Subject: gnome-keyring Unexpected 'NoKeyringDaemonError'
- Date: Thu, 20 Nov 2008 09:58:01 +0100
Hello.
My name is Juan Luis Belmonte. I'm working on an opensource gsm
connection manager called wader (https://public.warp.es/wader/).
We are preparing the last fixes for the 0.3.0 release, and we have a
little issue, that I can't understand. For storing the password of the
connection we are using gnomeKeyring.
The project depends on network-manager, versions 7 and greater,
supports gsm, older ones not so we not depend on networkmanager dialing
when network-manager version is 0.6.x
I'm attaching a little python scriptcase, of what we do for managing
the secrets in the keyring.
The fact is that using network manager 0.7 everything goes well, but
using 0.6X at the moment of getting the secrets from the keyring, we get
an unexpected 'NoKeyringDaemonError'. But the gnome-keyring-daemon is
already running.
We thought it was our code, but after extracting both operations of
store and load in this script I'm attaching. Everything goes well. If
you compare the error file and the script, you can see that the last
call function in the error, is present in the testcase, but as I said,
it works when just executing this script. Wich is 99% similar to the
real code, it only changes the variables.
The purpose of why I am writing, is to ask you if there is a known issue
about this, or if you can give us an advice or some light about what
can be happening to us.
Thank you very much for reading me.
My best regards.
File "/usr/lib/python2.5/site-packages/wader/common/dialer.py", line 194, in activate_connection
d = self.configure_device(profile_path, device_path)
File "/usr/lib/python2.5/site-packages/wader/common/dialer.py", line 174, in configure_device
conf = DialerConf.from_dbus_path(profile_path)
File "/usr/lib/python2.5/site-packages/wader/common/dialer.py", line 83, in from_dbus_path
cls.password = load_secrets(uuid)[0]
File "/usr/lib/python2.5/site-packages/wader/common/secrets.py", line 26, in load_secrets
secrets = keyring.find_items_sync(keyring.ITEM_GENERIC_SECRET, attrs)
NoKeyringDaemonError
#!/usr/bin/python
import gnomekeyring as keyring
import gobject
gobject.set_application_name('testcase')
def load_secrets(_uuid):
attrs = {'connection-uuid' : str(_uuid) }
secrets = keyring.find_items_sync(keyring.ITEM_GENERIC_SECRET, attrs)
if len(secrets) == 1:
print secrets[0].secret
else:
print secrets[0].secret,secrets[1].secret
def save_network_secret():
attrs = {'connection-uuid' : 'foo',
'setting-name' : 'gsm', 'setting-key' : 'password'}
args = ('foo', 'gsm', 'password')
name = 'foobar secret password'
update_if_exists = True
kg_name = keyring.get_default_keyring_sync()
keyring.item_create_sync(kg_name, keyring.ITEM_GENERIC_SECRET,
name, attrs, 'secretpassword', update_if_exists)
print 'setting a test secret'
save_network_secret()
print 'trying to retrieve a secret from gnomeKeyring'
load_secrets('foo')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]