~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2010-10-13 00:26:41 UTC
  • mto: This revision was merged to the branch mainline in revision 5498.
  • Revision ID: andrew.bennetts@canonical.com-20101013002641-9tlh9k89mlj1666m
Keep docs-plain working.

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
28
from bzrlib.config import AuthenticationConfig, GlobalConfig
31
 
from bzrlib.i18n import gettext
 
29
 
32
30
 
33
31
LAUNCHPAD_BASE = 'https://launchpad.net/'
34
32
 
63
61
        auth_username = _get_auth_user(auth)
64
62
        # Auto-upgrading
65
63
        if auth_username is None:
66
 
            trace.note(gettext('Setting ssh/sftp usernames for launchpad.net.'))
 
64
            trace.note('Setting ssh/sftp usernames for launchpad.net.')
67
65
            _set_auth_user(username, auth)
68
66
        elif auth_username != username:
69
67
            raise MismatchedUsernames()
102
100
    uploaded SSH keys.
103
101
    """
104
102
    if _transport is None:
105
 
        _transport = transport.get_transport_from_url(LAUNCHPAD_BASE)
 
103
        _transport = transport.get_transport(LAUNCHPAD_BASE)
106
104
 
107
105
    try:
108
106
        data = _transport.get_bytes('~%s/+sshkeys' % username)