[Freeipa-devel] [PATCH] 899 more context with attribute in error message

Rob Crittenden rcritten at redhat.com
Fri Dec 9 19:11:11 UTC 2011


Martin Kosek wrote:
> On Fri, 2011-10-21 at 15:28 -0400, Rob Crittenden wrote:
>> Depending on the context and how you are using input (-- options or
>> set/addattr) you might get a different attribute name in the error
>> message. This patch tries to clear that up a bit.
>>
>> See the ticket for some test cases.
>>
>> rob
>
> I found few issues with this patch:
>
> 1) This patch cannot be applied. First chunk (frontend.py) was already
> pushed in other patch
>
> 2) Actually, this patch did not work for me:
>
> # ipa pwpolicy-mod --setattr=krbpwdmaxfailure=-1
> ipa: ERROR: invalid 'krbpwdmaxfailure':  must be at least 0
>
> cli_name still did not show up.
>
> I also see that you did the change for Int onlu. I guess we should fix
> all parameters, for example StrEnum, etc.:
>
> # ipa sudorule-add foo --usercat=bar
> ipa: ERROR: invalid 'usercat': must be one of (u'all',)
> # ipa sudorule-add foo --setattr=usercategory=bar
> ipa: ERROR: invalid 'usercategory':  must be one of (u'all',)
>
> Martin
>

This must have gotten fixed by some other patch. This is the behavior we 
want. When using a named option we should return that in the error 
message. When using an attribute name we should return that.

I think this ticket can be closed.

rob




More information about the Freeipa-devel mailing list