[Calypso] [PATCH] Ignore items when an exception is raised while checking if the item matches a filter.
Guido Günther
agx at sigxcpu.org
Tue Jun 7 22:34:46 PDT 2016
Hi Jelmer,
On Tue, Jun 07, 2016 at 10:59:13PM +0000, Jelmer Vernooij wrote:
> From: Jelmer Vernooij <jelmer at jelmer.uk>
>
> This is necessary e.g. as a workaround for the use of vcalendar-style RRULE
> entries. https://github.com/eventable/vobject/issues/34
> ---
> calypso/xmlutils.py | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/calypso/xmlutils.py b/calypso/xmlutils.py
> index e01fcb0..7d4fbad 100644
> --- a/calypso/xmlutils.py
> +++ b/calypso/xmlutils.py
> @@ -380,7 +380,11 @@ def report(path, xml_request, collection):
>
>
> for item in items:
> - if not match_filter(item, filter_element):
> + try:
> + if not match_filter(item, filter_element):
> + continue
> + except Exception, e:
> + log.error("Exception %r while filtering %r", e, item.urlpath)
> continue
>
> response = ET.Element(_tag("D", "response"))
ACK.
-- Guido
More information about the Calypso
mailing list