~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Samuel Bronson
  • Date: 2012-08-30 20:36:18 UTC
  • mto: (6015.57.3 2.4)
  • mto: This revision was merged to the branch mainline in revision 6558.
  • Revision ID: naesten@gmail.com-20120830203618-y2dzw91nqpvpgxvx
Update INSTALL for switch to Python 2.6 and up.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
 
17
 
17
18
"""Directory lookup that uses Launchpad."""
18
19
 
19
 
from __future__ import absolute_import
20
 
 
21
20
from urlparse import urlsplit
22
21
import xmlrpclib
23
22
 
27
26
    trace,
28
27
    transport,
29
28
    )
30
 
from bzrlib.i18n import gettext
31
29
 
32
30
from bzrlib.plugins.launchpad.lp_registration import (
33
31
    LaunchpadService, ResolveLaunchpadPathRequest)
132
130
            else:
133
131
                # There are either 0 or > 2 path parts, neither of which is
134
132
                # supported for these schemes.
135
 
                raise errors.InvalidURL('Bad path: %s' % url)
 
133
                raise errors.InvalidURL('Bad path: %s' % result.path)
136
134
            # Expand any series shortcuts, but keep unknown series.
137
135
            series = distro_series.get(series, series)
138
136
            # Hack the url and let the following do the final resolution.
166
164
            if 'launchpad' in debug.debug_flags:
167
165
                local_res = result
168
166
                result = self._resolve_via_xmlrpc(path, url, _request_factory)
169
 
                trace.note(gettext(
170
 
                    'resolution for {0}\n  local: {1}\n remote: {2}').format(
171
 
                           url, local_res['urls'], result['urls']))
 
167
                trace.note('resolution for %s\n  local: %s\n remote: %s'
 
168
                           % (url, local_res['urls'], result['urls']))
172
169
        else:
173
170
            result = self._resolve_via_xmlrpc(path, url, _request_factory)
174
171