From 773e4cfca4838ad0a0ac543ff23bd56b18e2b2d7 Mon Sep 17 00:00:00 2001 From: Unrud Date: Wed, 30 Aug 2017 18:03:39 +0200 Subject: [PATCH] Remove filter_length variable --- radicale/xmlutils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/radicale/xmlutils.py b/radicale/xmlutils.py index 7c6364d..76c4b1f 100644 --- a/radicale/xmlutils.py +++ b/radicale/xmlutils.py @@ -166,7 +166,6 @@ def _comp_match(item, filter_, scope="collection"): # TODO: Filtering VALARM and VFREEBUSY is not implemented # HACK: the filters are tested separately against all components - filter_length = len(filter_) if scope == "collection": tag = item.name else: @@ -174,10 +173,10 @@ def _comp_match(item, filter_, scope="collection"): if not tag: return False name = filter_.get("name").upper() - if filter_length == 0: + if len(filter_) == 0: # Point #1 of rfc4791-9.7.1 return name == tag - if filter_length == 1: + if len(filter_) == 1: if filter_[0].tag == _tag("C", "is-not-defined"): # Point #2 of rfc4791-9.7.1 return name != tag