[Yum-devel] [PATCH 2/3] Do the pkgmatch_fails negative caching, in _search
James Antill
james at fedoraproject.org
Mon Apr 12 18:08:20 UTC 2010
On Mon, 2010-04-12 at 13:50 -0400, Seth Vidal wrote:
>
> On Mon, 12 Apr 2010, James Antill wrote:
>
> > On Mon, 2010-04-12 at 13:07 -0400, Seth Vidal wrote:
> >
> >> anything wrong with:
> >>
> >> if name and name in self._pkgmatch_fails:
> >
> > Well all the other code in that function uses "name is not None", on
> > the other hand I seriously doubt anyone is passing a name of '' :)
> >
> >> the 'is not None' thing I've tried to stop using b/c it gets in weird
> >> trouble with funky object types.
> >
> > I'm not sure what you mean ... as far as I know no object can return
> > true for "is None"?
> >
>
> NoneType objects can, iirc.
I'm not sure what those are, but the type object for None isn't None:
In [1]: types.NoneType is None
Out[1]: False
> and do we want pkgnames like ''?
>
> which is not NONE but...
Well I think we want this to continue to not print anything:
% yum list ''
Error: No matching Packages to list
%
...dito. install/update/etc. ... but I don't think changing is None in
this function will do that, and I hope we can tell people where to go
that manage to create rpm packages with '' as the name :).
Generally I think "is None" is clearer, but meh...
More information about the Yum-devel
mailing list