/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: Vincent Ladeuil
  • Date: 2009-08-12 17:53:03 UTC
  • mto: This revision was merged to the branch mainline in revision 658.
  • Revision ID: v.ladeuil+lp@free.fr-20090812175303-d2zsch3kqy0ksgas
Fix #403430 by checking gobject get_application_name availability.

* keyring.py:
(GnomeKeyringCredentialStore.__init__): Fix incompatible gobject
on Ubuntu hardy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
    def __init__(self):
31
31
        CredentialStore.__init__(self)
32
 
        # External apps that load bzrlib may also set this, so 
33
 
        # don't override:
34
 
        if gobject.get_application_name() is None:
 
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:
 
36
            # External applications that load bzrlib may already have set the
 
37
            # application name so we don't contradict them (when we can
 
38
            # determine it that is).
35
39
            gobject.set_application_name("bzr")
36
40
 
37
41
    def decode_password(self, credentials):