Merge pull request #398 from untitaker/unbound

Fix UnboundLocalError
This commit is contained in:
Guillaume Ayoub 2016-05-18 22:47:37 +02:00
commit 68b72f55eb

View File

@ -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