/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_registration.py

  • Committer: Andrew Bennetts
  • Date: 2008-09-08 12:59:00 UTC
  • mfrom: (3695 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3756.
  • Revision ID: andrew.bennetts@canonical.com-20080908125900-8ywtsr7jqyyatjz0
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
            # TODO: if there's no registrant email perhaps we should
105
105
            # just connect anonymously?
106
106
            scheme, hostinfo, path = urlsplit(self.service_url)[:3]
107
 
            assert '@' not in hostinfo
108
 
            assert self.registrant_email is not None
109
 
            assert self.registrant_password is not None
 
107
            if '@' in hostinfo:
 
108
                raise AssertionError(hostinfo)
 
109
            if self.registrant_email is None:
 
110
                raise AssertionError()
 
111
            if self.registrant_password is None:
 
112
                raise AssertionError()
110
113
            # TODO: perhaps fully quote the password to make it very slightly
111
114
            # obscured
112
115
            # TODO: can we perhaps add extra Authorization headers
139
142
 
140
143
    def send_request(self, method_name, method_params, authenticated):
141
144
        proxy = self.get_proxy(authenticated)
142
 
        assert method_name
143
145
        method = getattr(proxy, method_name)
144
146
        try:
145
147
            result = method(*method_params)
240
242
    _methodname = 'link_branch_to_bug'
241
243
 
242
244
    def __init__(self, branch_url, bug_id):
243
 
        assert branch_url
244
245
        self.bug_id = bug_id
245
246
        self.branch_url = branch_url
246
247