~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to lp_registration.py

  • Committer: Martin Pool
  • Date: 2006-03-23 16:32:21 UTC
  • mto: (1668.1.8 bzr-0.8.mbp)
  • mto: This revision was merged to the branch mainline in revision 1710.
  • Revision ID: mbp@sourcefrog.net-20060323163221-353da0ce9b3ff424
(register-branch) fix ordering of parameters and restore transport-level test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    registrant_email = None
34
34
    registrant_password = None
35
35
 
 
36
    def __init__(self):
 
37
        """Construct a new service talking to the launchpad rpc server"""
 
38
        pass
 
39
 
36
40
    @property
37
41
    def service_url(self):
38
42
        """Return the http or https url for the xmlrpc server.
45
49
        else:
46
50
            return self.DEFAULT_SERVICE_URL
47
51
 
48
 
 
49
52
    def get_proxy(self):
50
53
        """Return the proxy for XMLRPC requests."""
51
54
        # auth info must be in url
 
55
        # TODO: if there's no registrant email perhaps we should just connect
 
56
        # anonymously?
52
57
        scheme, hostinfo, path = urlsplit(self.service_url)[:3]
53
58
        assert '@' not in hostinfo
54
59
        assert self.registrant_email is not None
100
105
 
101
106
    _methodname = 'register_branch'
102
107
 
103
 
    def __init__(self, branch_url, 
 
108
    def __init__(self, branch_url,
104
109
                 branch_name='',
105
110
                 branch_title='',
106
111
                 branch_description='',
 
112
                 author_email='',
107
113
                 product_name='',
108
 
                 author_email='',
109
114
                 ):
110
115
        assert branch_url
111
116
        self.branch_url = branch_url