Code review comment for lp:~thumper/launchpad/fix-vocab-oops

Revision history for this message
Tim Penhey (thumper) wrote :

= Summary =

Don't oops if the user types something stupid into the search field.

== Proposed fix ==

Fix the branch collection search method.

== Implementation details ==

BranchLookup.getByUrl raises many different exceptions, we should catch them.

== Tests ==

test_branchcollection.TestSearch

== Demo and Q/A ==

try to link a branch by typing in an incomplete lp: url.

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/code/model/branchcollection.py
  lib/lp/code/model/tests/test_branchcollection.py

== Pylint notices ==

lib/lp/code/model/branchcollection.py
    294: [W0703, GenericBranchCollection._getExactMatch] Catch "Exception"

Yes, I know.

« Back to merge proposal