Bart Smaalders wrote:

> This looks fine to me... but I tried to find a more elegant fix for the
> verify routine in user.py, though, as the logic has gotten somewhat
> convoluted.

Indeed.

>        pwdefval["ftpuser"] = "true"
>        should_be = pwdefval.copy().update(self.attrs)

Sadly .update() doesn't return the dict.  Bah.

>        # enable check for missing attrs
>        for k in should_be:
>            cur_attrs.setdefault(k, "<missing>")

So if I add another loop here:

         for k in cur_attrs:
             if cur_attrs[k]:
                 should_be.setdefault(k, "<empty>")

then it continues to pass the suite.

>        return [
>        "%s: '%s' should be '%s'" % (a, cur_attrs[a], should_be[a])
>        for a in should_be.keys()

I also changed this to "for a in should_be".

The downside to this is that in order to make the group action match, it's
grown quite a bit more.

I've uploaded a new webrev:

    http://cr.opensolaris.org/~dduvall/pkg-userverify2/

see what you think.

Thanks,
Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to