/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-03-23 09:49:44 UTC
  • mfrom: (723.1.1 isearch)
  • Revision ID: jelmer@samba.org-20110323094944-7n5h1vif3xpbze3p
Merge support for interactive substring search in bzr viz and annotate.

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
 
from gi.repository import GObject
 
17
import gobject
18
18
try:
19
19
    import gnomekeyring
20
20
except ImportError:
29
29
 
30
30
    def __init__(self):
31
31
        CredentialStore.__init__(self)
32
 
        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:
33
36
            # External applications that load bzrlib may already have set the
34
37
            # application name so we don't contradict them (when we can
35
38
            # determine it that is).
36
 
            GObject.set_application_name("bzr")
 
39
            gobject.set_application_name("bzr")
37
40
 
38
41
    def decode_password(self, credentials):
39
42
        if gnomekeyring is None: