← Back to team overview

lazr-developers team mailing list archive

[Bug 309988] [NEW] getByCategory() should accept a default argument

 

Public bug reported:

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.

** Affects: lazr.config
     Importance: Undecided
         Status: New

-- 
getByCategory() should accept a default argument
https://bugs.launchpad.net/bugs/309988
You received this bug notification because you are a member of LAZR
Developers, which is the registrant for lazr.config.

Status in lazr.config: New

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.



Follow ups

References