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

seth vidal skvidal at linux.duke.edu
Wed May 31 19:49:10 UTC 2006


On Wed, 2006-05-31 at 14:54 -0400, Bret McMillan wrote:
> Some of the PackageSack.returnNewestBy* functions now throw a
> PackageSackError if there is no package matching that name.
> 
> This causes some pain in MetaSack._computeAggregateListResult when I do
> something like 'yum update python-devel', and have 3 repositories, with
> one of them not having python-devel at all.
> 
> _computeAggregate* are really generic; dealing with exceptions for
> anything non-critical seems impractical... what am I missing?  Just
> seems like returnNewestBy* should be able to return None if there wasn't
> any match; it doesn't seem to warrant an exception.

I guess I don't understand what the big deal is about catching the
exceptions in _computerAggregate*.

why not just enclose the call in a try, except?

what's the expense?
-sv





More information about the Yum-devel mailing list