瀏覽代碼

Fix UnboundLocalError

Markus Unterwaditzer 9 年之前
父節點
當前提交
eea6ccb573
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      radicale/xmlutils.py

+ 3 - 0
radicale/xmlutils.py

@@ -133,6 +133,9 @@ def _comp_match(item, filter_, scope="collection"):
         for component in item.components():
             if component.name in ("VTODO", "VEVENT", "VJOURNAL"):
                 tag = component.name
+                break
+        else:
+            return False
     if filter_length == 0:
         # Point #1 of rfc4791-9.7.1
         return filter_.get("name") == tag