Comment 4 for bug 745801

Revision history for this message
Martin Pool (mbp) wrote : Re: system-based authorization doesn't store useful credentials in gnome-keyring

parser.write() sent to a stringio does seem to produce the right kind of thing:

'[1]\nconsumer_key = System-wide: Ubuntu (myhostname)\nconsumer_secret = \naccess_token = uuuuuuuuuuuuuuuu\naccess_secret = uuuuuuuuuuuuuuuuuuuuuuuuuuuuuu\n\n'

Apparently the Python keyring module, or something it calls, assumes passwords are a single line and it truncates them at the first \n: if I immediately try to get it back then

keyring.get_password('launchpadlib', 'System-wide: Ubuntu (grace)@https://api.launchpad.net/')
'[1]'

however a simple interactive use of the keyring module doesn't hit this:

In [4]: keyring.set_password('test', 'test', 'bite\nme')

In [5]: keyring.get_password('test', 'test')
Out[5]: 'bite\nme'

In [6]: print _5
bite
me