Thanks for your response Armin.
Returning MyUndefined() would still raise an exception, wouldn't it?
Anyway, it seems that
def __call__(self, *args, **kwargs):
logger.warning('call failed silently.')
return u''
is the behavior i was looking for ...
Still not sure if this is going to bite me later :s.
Best regards,
Jeroen
On Aug 31, 9:10 pm, Armin Ronacher <[email protected]>
wrote:
> Hi,
>
> On 2011-08-31 1:42 PM, Jeroen Dierckx wrote:> environment, but i want it to
> fail silently on method calls too, like
> > jinja1 :s
>
> Probably just define __call__ like this:
>
> class MyUndefined(Undefined):
> ...
> def __call__(self, *args, **kwargs):
> return MyUndefined()
>
> Regards,
> Armin
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pocoo-libs?hl=en.