getByCategory() should accept a default argument

Bug #309988 reported by Barry Warsaw
2
Affects Status Importance Assigned to Milestone
lazr.config
Fix Released
Low
Barry Warsaw

Bug Description

getByCategory() raises a NoCatetoryError when no sections exist for the category. This tends to be inconvenient to use because you have to import an exception class at catch the error should you, say want to return an empty list. getByCategory() could take and optional default argument to return in that case, raising the error if no default is given.

Related branches

Barry Warsaw (barry)
Changed in lazr.config:
assignee: nobody → barry
importance: Undecided → Low
status: New → In Progress
Barry Warsaw (barry)
Changed in lazr.config:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.