On Mon, 2012-05-14 at 17:45 -0400, Rob Crittenden wrote:
> Martin Kosek wrote:
> > On Fri, 2012-05-11 at 16:34 -0400, Rob Crittenden wrote:
> >> permission-find --subtree wasn't implemented so always returned all
> >> entries (the option was ignored).
> >>
> >> rob
> >
> > I found the following 2 issues:
> >
> > 1) The following piece of code is over-complicated:
> >
> > +                found = False
> > +                if kw['subtree'] == target:
> > +                    found = True
> > +                if not found:
> > +                    try:
> > +                        results.remove(a)
> > +                    except ValueError:
> > +                        pass
> >
> > This would simpler and more readable:
> > +                if kw['subtree'] != target:
> > +                    try:
> > +                        results.remove(a)
> > +                    except ValueError:
> > +                        pass
> >
> > 2) I know we don't validate the subtree expression, but I wonder if we
> > shouldn't make the subtree comparing at least case insensitive as DN is
> > also not case sensitive.
> >
> > Martin
> >
> 
> Yeah, much simpler. Fixed both.
> 
> rob

ACK. Pushed to master.

Martin

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to