~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-03-13 02:12:57 UTC
  • mfrom: (3246.4.5 bug.196618)
  • Revision ID: pqm@pqm.ubuntu.com-20080313021257-1l2g9qfezux7fboc
(Daniel Watkins) Change some assertions to exceptions in LP plugin.
 (#196618)

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
                 author_email='',
206
206
                 product_name='',
207
207
                 ):
208
 
        assert branch_url, 'branch_url %r is invalid' % branch_url
 
208
        if not branch_url:
 
209
            raise errors.InvalidURL(branch_url, "You need to specify a non-empty branch URL.")
209
210
        self.branch_url = branch_url
210
211
        if branch_name:
211
212
            self.branch_name = branch_name
257
258
    _authenticated = False
258
259
 
259
260
    def __init__(self, path):
260
 
        assert path
 
261
        if not path:
 
262
            raise errors.InvalidURL(path=path,
 
263
                                    extra="You must specify a product.")
261
264
        self.path = path
262
265
 
263
266
    def _request_params(self):