/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 __init__.py

  • Committer: Jelmer Vernooij
  • Date: 2009-05-21 20:26:23 UTC
  • mto: This revision was merged to the branch mainline in revision 637.
  • Revision ID: jelmer@samba.org-20090521202623-13p2a83xg5cshpx3
Support gnome keyring.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
import bzrlib
38
38
import bzrlib.api
39
 
from bzrlib import errors
 
39
from bzrlib import (
 
40
    config,
 
41
    errors,
 
42
    )
40
43
from bzrlib.commands import plugin_cmds
41
44
 
42
45
import os.path
150
153
        return "No DISPLAY. Unable to run GTK+ application."
151
154
 
152
155
 
 
156
credential_store_registry = getattr(config, "credential_store_registry", None)
 
157
if credential_store_registry is not None:
 
158
    try:
 
159
        credential_store_registry.register_lazy(
 
160
            "gnome-keyring", "bzrlib.plugins.gtk.keyring", "GnomeKeyringCredentialStore",
 
161
            help="The GNOME Keyring.", fallback=True)
 
162
    except TypeError:
 
163
    # Fallback credentials stores were introduced in Bazaar 1.15
 
164
        credential_store_registry.register_lazy(
 
165
            "gnome-keyring", "bzrlib.plugins.gtk.keyring", "GnomeKeyringCredentialStore",
 
166
            help="The GNOME Keyring.")
 
167
 
 
168
 
153
169
def load_tests(basic_tests, module, loader):
154
170
    testmod_names = [
155
171
        'tests',