[Freeipa-devel] [PATCH] Added error handler for ipa_cmd().

Adam Young ayoung at redhat.com
Thu Sep 30 00:01:14 UTC 2010


On 09/29/2010 05:05 PM, Adam Young wrote:
> On 09/29/2010 04:53 PM, Adam Young wrote:
>> On 09/29/2010 03:17 PM, Endi Sukma Dewata wrote:
>>> ----- "Adam Young"<ayoung at redhat.com>  wrote:
>>>
>>>> Endi, can you add in a Unit test for this? If need be, extend the
>>>> ipa_cmd so that it looks for an optional command line param that makes
>>>> it try to fetch a .json file that doesn't exist:
>>>>
>>>>
>>>> Something like
>>>> var suffix = $.bbq.get("cmd_suffix");
>>>> if (suffix){
>>>> method += suffix;
>>>> }
>>>> method += '.json';
>>>>
>>>> ...
>>> Attached is a new patch based on the latest master with unit tests.
>>> ipa_cmd() error can be simulated by overriding $.ajax with a mockup
>>> function. Thanks!
>>>
>>> -- 
>>> Endi S. Dewata
>> ACK
>>
>> _______________________________________________
>> Freeipa-devel mailing list
>> Freeipa-devel at redhat.com
>> https://www.redhat.com/mailman/listinfo/freeipa-devel
> Pushed to master
>
> _______________________________________________
> Freeipa-devel mailing list
> Freeipa-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/freeipa-devel
Should have remembered this approach, standard JS way to deal with 
undefined values.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: admiyo-freeipa-0048-3-Item-Level-Undo.patch
Type: text/x-patch
Size: 16182 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20100929/6822349b/attachment.bin>


More information about the Freeipa-devel mailing list