~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Aaron Bentley
  • Date: 2008-03-03 16:52:41 UTC
  • mfrom: (3144.3.11 fix-conflict-handling)
  • mto: This revision was merged to the branch mainline in revision 3250.
  • Revision ID: aaron@aaronbentley.com-20080303165241-0k2c7ggs6kr9q6hf
Merge with fix-conflict-handling

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    def __init__(self, base):
59
59
        super(LaunchpadTransport, self).__init__(base)
60
60
        # We only support URLs without a netloc
61
 
        netloc = urlsplit(base)[1]
62
 
        if netloc != '':
 
61
        self.lp_instance = urlsplit(base)[1]
 
62
        if self.lp_instance == '':
 
63
            self.lp_instance = None
 
64
        elif self.lp_instance not in LaunchpadService.LAUNCHPAD_INSTANCE:
63
65
            raise errors.InvalidURL(path=base)
64
66
 
65
67
    def _requires_launchpad_login(self, scheme, netloc, path, query,
80
82
        path = urlsplit(abspath)[2].lstrip('/')
81
83
        # Perform an XMLRPC request to resolve the path
82
84
        resolve = _request_factory(path)
83
 
        service = LaunchpadService()
 
85
        service = LaunchpadService(lp_instance=self.lp_instance)
84
86
        try:
85
87
            result = resolve.submit(service)
86
88
        except xmlrpclib.Fault, fault: