~nataliabidart/ubuntu-sso-client/displayname-stable

« back to all changes in this revision

Viewing changes to ubuntu_sso/keyring.py

  • Committer: Tarmac
  • Author(s): natalia.bidart at canonical
  • Date: 2010-09-10 21:01:47 UTC
  • mfrom: (620.1.1 fix-keyring-create)
  • Revision ID: tarmac-20100910210147-47ewye775iobbxp5
* Passing a second parameter 'None' to gnomekerying.create_sync (LP: #634465).

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
 
59
59
class Keyring(object):
60
60
    """A Keyring for a given application name."""
 
61
 
61
62
    KEYRING_NAME = "login"
62
63
 
63
64
    def __init__(self, app_name):
71
72
        """Creates a keyring, or if it already exists, it does nothing."""
72
73
        keyring_names = gnomekeyring.list_keyring_names_sync()
73
74
        if not name in keyring_names:
74
 
            gnomekeyring.create_sync(name)
 
75
            gnomekeyring.create_sync(name, None)
75
76
 
76
77
    def _find_keyring_item(self, attr=None):
77
78
        """Return the keyring item or None if not found."""