[Freeipa-devel] [PATCH] Provide more detailed NotFound error messages from baseldap.py classes.
Rob Crittenden
rcritten at redhat.com
Tue Mar 9 21:53:00 UTC 2010
Pavel Zuna wrote:
> Rob Crittenden wrote:
>> Pavel Zuna wrote:
>>> Rob Crittenden wrote:
>>>> Pavel Zuna wrote:
>>>>> Pavel Zuna wrote:
>>>>>> We talked about this on yesterdays quick server call.
>>>>>>
>>>>>> Here's what the messages look like:
>>>>>>
>>>>>> # ipa user-show idontexist
>>>>>> ipa: ERROR: idontexist: user not found
>>>>>>
>>>>>> # ipa group-show idontexist
>>>>>> ipa: ERROR: idontexist: group not found
>>>>>>
>>>>>> # ipa automountmap-add idontexist somemap
>>>>>> ipa: ERROR: idontexist: automount location not found
>>>>>>
>>>>>> All subclasses of LDAPObject can override these of course. And no,
>>>>>> it's not hardcoded for 'idontexist'. :)
>>>>>>
>>>>>> Pavel
>>>>> Oups, accidentally left some debugging output in there, sorry. :)
>>>>> New patch attached.
>>>>>
>>>>> Pavel
>>>>
>>>> I don't think the try/except in LDAPUpdate around ldap.get_entry()
>>>> after the record has been updated is quite right. I guess it is
>>>> probably a good idea to catch it but if it is not found it means
>>>> that the entry was deleted after successfully updating it but before
>>>> we could pull it again to display it. To be honest, I'm not sure
>>>> >what< we should do here, but I'm not sure NotFound is the right
>>>> thing :-)
>>>>
>>>> This seems like a mid-air collision. I wonder if we should add a
>>>> special exception for this. Not sure what the user would do with it
>>>> but we should warn them at least.
>>> Good idea. I think raising midair collision exception with a special
>>> message saying what happened should be enough. We can always add a
>>> new exception for it later.
>>>
>>>> rob
>>>
>>> Pavel
>>
>> This looks like the same patch, was it updated?
>>
>> rob
> I accidentally attached the old patch, sorry.
>
> Pavel
>
ack, pushed to master
rob
More information about the Freeipa-devel
mailing list