getByCategory() should accept a default argument
Bug #309988 reported by
Barry Warsaw
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
lp:~barry/lazr.config/bug-309988
- Curtis Hovey: Pending (code) requested
lp:~barry/lazr.config/megamerge
- Curtis Hovey (community): Approve (code)
Changed in lazr.config: | |
assignee: | nobody → barry |
importance: | Undecided → Low |
status: | New → In Progress |
Changed in lazr.config: | |
status: | In Progress → Fix Released |
To post a comment you must log in.