FIXED!! :) but i put it inside 'cannot_auth_function':

def cannot_auth_function(ctx, state):
        ctx.descriptor.reset_function()
        return {"state": state}

so it will be called only when it's needed.

thank you very much Burak! also don't forget to add a note here:
http://arskom.github.com/rpclib/faq.html#how-do-i-alter-the-behaviour-of-a-user-method-without-using-decorators

azur




______________________________________________________________
> Od: [email protected]
> Komu: <[email protected]>
> Dátum: 06.12.2011 21:34
> Predmet: Re: [Soap-Python] rpclib - very strange problem
>
>On 06.12.2011 20:59, azurIt wrote:
>> Problem is that ctx.descriptor.function is probably pointer to real
>> function which gets permanently (=until it is reloaded into memory)
>> replaced by cannot_auth_function. Any hints how should i do this
>> correctly ? :)
>>
>
>shit.
>
>okay, i added a reset() to the MethodContext object. That way you'll be 
>able to restore the original function when perm == True. Does this fix 
>your problem?
>
>i knew this would turn out to be an rpclib problem :) congrats for 
>spotting this.
>
>best,
>burak
>
>_______________________________________________
>Soap mailing list
>[email protected]
>http://mail.python.org/mailman/listinfo/soap
>
_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap

Reply via email to