/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Aaron Bentley
  • Date: 2010-11-23 14:54:33 UTC
  • mto: This revision was merged to the branch mainline in revision 5549.
  • Revision ID: aaron@aaronbentley.com-20101123145433-i231qdd7v9t6yf5t
Cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    STAGING_SERVICE_ROOT,
49
49
    Launchpad,
50
50
    )
51
 
from launchpadlib.uris import (
52
 
    LPNET_SERVICE_ROOT,
53
 
    )
54
 
 
 
51
try:
 
52
    from launchpadlib.uris import LPNET_SERVICE_ROOT
 
53
except ImportError:
 
54
    LPNET_SERVICE_ROOT = 'https://api.launchpad.net/beta/'
55
55
 
56
56
 
57
57
# Declare the minimum version of launchpadlib that we need in order to work.
191
191
    @staticmethod
192
192
    def tweak_url(url, launchpad):
193
193
        """Adjust a URL to work with staging, if needed."""
194
 
        if 'qastaging' in str(launchpad._root_uri):
195
 
            return url.replace('bazaar.launchpad.net',
196
 
                    'bazaar.qastaging.launchpad.net')
197
194
        if str(launchpad._root_uri) != STAGING_SERVICE_ROOT:
198
195
            return url
199
196
        if url is None: