[Calypso] [PATCH] Ignore items when an exception is raised while checking if the item matches a filter.

Jelmer Vernooij jelmer at jelmer.uk
Tue Jun 7 15:59:13 PDT 2016


From: Jelmer Vernooń≥ <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"))
-- 
2.8.1



More information about the Calypso mailing list