~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge fix for bug #583667 targeted at 2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
    raise errors.DependencyNotPresent('launchpadlib', e)
44
44
 
45
45
from launchpadlib.launchpad import (
46
 
    EDGE_SERVICE_ROOT,
47
46
    STAGING_SERVICE_ROOT,
48
47
    Launchpad,
49
48
    )
76
75
 
77
76
LAUNCHPAD_API_URLS = {
78
77
    'production': 'https://api.launchpad.net/beta/',
79
 
    'edge': EDGE_SERVICE_ROOT,
80
78
    'staging': STAGING_SERVICE_ROOT,
81
79
    'dev': 'https://api.launchpad.dev/beta/',
82
80
    }
85
83
def _get_api_url(service):
86
84
    """Return the root URL of the Launchpad API.
87
85
 
88
 
    e.g. For the 'edge' Launchpad service, this function returns
89
 
    launchpadlib.launchpad.EDGE_SERVICE_ROOT.
 
86
    e.g. For the 'staging' Launchpad service, this function returns
 
87
    launchpadlib.launchpad.STAGING_SERVICE_ROOT.
90
88
 
91
89
    :param service: A `LaunchpadService` object.
92
90
    :return: A URL as a string.