/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to keyring.py

  • Committer: Jelmer Vernooij
  • Date: 2011-11-02 11:11:06 UTC
  • mfrom: (734.1.55 gtk3)
  • Revision ID: jelmer@samba.org-20111102111106-7l0vso8eg24dpf87
Merge gtk3 support from Curtis.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
 
import gobject
 
17
from gi.repository import GObject
18
18
try:
19
19
    import gnomekeyring
20
20
except ImportError:
28
28
class GnomeKeyringCredentialStore(CredentialStore):
29
29
 
30
30
    def __init__(self):
31
 
        CredentialStore.__init__(self)
32
 
        # Older versions of gobject don't provide get_application_name so we
33
 
        # can't always check.
34
 
        get_app_name = getattr(gobject, 'get_application_name', None)
35
 
        if get_app_name is None or get_app_name() is None:
 
31
        super(GnomeKeyringCredentialStore, self).__init__()
 
32
        if GObject.get_application_name() is None:
36
33
            # External applications that load bzrlib may already have set the
37
34
            # application name so we don't contradict them (when we can
38
35
            # determine it that is).
39
 
            gobject.set_application_name("bzr")
 
36
            GObject.set_application_name("bzr")
40
37
 
41
38
    def decode_password(self, credentials):
42
39
        if gnomekeyring is None: