~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

(vila) Merge 2.0 into 2.1 including fix for bug #583667 (Vincent
        Ladeuil)

Show diffs side-by-side

added added

removed removed

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