~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/launchpad/account.py

  • Committer: Jelmer Vernooij
  • Date: 2011-11-27 17:42:25 UTC
  • mto: This revision was merged to the branch mainline in revision 6311.
  • Revision ID: jelmer@samba.org-20111127174225-tspfeewl0gwxxumt
Add possible_transports in a couple more places.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
than once for each place that needs to take it into account.
21
21
"""
22
22
 
23
 
from __future__ import absolute_import
24
 
 
25
23
from bzrlib import (
26
24
    errors,
27
25
    trace,
28
26
    transport,
29
27
    )
30
 
from bzrlib.config import AuthenticationConfig, GlobalStack
 
28
from bzrlib.config import AuthenticationConfig, GlobalConfig
31
29
from bzrlib.i18n import gettext
32
30
 
33
31
LAUNCHPAD_BASE = 'https://launchpad.net/'
55
53
        disagree about username.
56
54
    """
57
55
    if _config is None:
58
 
        _config = GlobalStack()
 
56
        _config = GlobalConfig()
59
57
 
60
 
    username = _config.get('launchpad_username')
 
58
    username = _config.get_user_option('launchpad_username')
61
59
    if username is not None:
62
60
        auth = AuthenticationConfig()
63
61
        auth_username = _get_auth_user(auth)
72
70
 
73
71
def _set_global_option(username, _config=None):
74
72
    if _config is None:
75
 
        _config = GlobalStack()
76
 
    _config.set('launchpad_username', username)
 
73
        _config = GlobalConfig()
 
74
    _config.set_user_option('launchpad_username', username)
77
75
 
78
76
 
79
77
def set_lp_login(username, _config=None):