~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2015-12-17 18:39:00 UTC
  • mfrom: (6606.1.2 fix-float)
  • Revision ID: pqm@pqm.ubuntu.com-20151217183900-0719du2uv1kwu3lc
(vila) Inline testtools private method to fix an issue in xenial (the
 private implementation has changed in an backward incompatible way).
 (Jelmer Vernooij)

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
 
23
25
from bzrlib import (
24
26
    errors,
25
27
    trace,
26
28
    transport,
27
29
    )
28
 
from bzrlib.config import AuthenticationConfig, GlobalConfig
 
30
from bzrlib.config import AuthenticationConfig, GlobalStack
29
31
from bzrlib.i18n import gettext
30
32
 
31
33
LAUNCHPAD_BASE = 'https://launchpad.net/'
53
55
        disagree about username.
54
56
    """
55
57
    if _config is None:
56
 
        _config = GlobalConfig()
 
58
        _config = GlobalStack()
57
59
 
58
 
    username = _config.get_user_option('launchpad_username')
 
60
    username = _config.get('launchpad_username')
59
61
    if username is not None:
60
62
        auth = AuthenticationConfig()
61
63
        auth_username = _get_auth_user(auth)
70
72
 
71
73
def _set_global_option(username, _config=None):
72
74
    if _config is None:
73
 
        _config = GlobalConfig()
74
 
    _config.set_user_option('launchpad_username', username)
 
75
        _config = GlobalStack()
 
76
    _config.set('launchpad_username', username)
75
77
 
76
78
 
77
79
def set_lp_login(username, _config=None):