~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2012-02-01 19:18:09 UTC
  • mfrom: (6459 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6460.
  • Revision ID: jelmer@samba.org-20120201191809-xn340a5i5v4fqsfu
Merge bzr.dev.

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