[Yum-devel] returnNewestByName & PackageSackError's ...

Bret McMillan bretm at redhat.com
Thu Jun 1 13:02:52 UTC 2006


On Thu, 2006-06-01 at 00:04 -0700, Panu Matilainen wrote:

> > So, the options are either:
> > a)  skip all PackageSackErrors (ick)
> > b)  create a more specific exception, say PackageNotFound, and look
> > specifically for that in _computeAggregate* and skip it
> > c)  just return None.
> 
> d) What I'd prefer is instead of None, return [] so you don't need 
> check if it was None or a list and handle specially. IIRC a a couple of 
> years ago in rpm python bindings an interface was changed from return 
> empty list instead of None because everybody hated the special casing None 
> caused :)

Yeah, I could definitely see that instead.

--Bret





More information about the Yum-devel mailing list