Просмотр исходного кода

Remove getattr from storage.Item

Unrud 7 лет назад
Родитель
Сommit
75c1168f54
2 измененных файлов с 1 добавлено и 4 удалено
  1. 0 3
      radicale/storage.py
  2. 1 1
      radicale/xmlutils.py

+ 0 - 3
radicale/storage.py

@@ -432,9 +432,6 @@ class Item:
         self._component_name = component_name
         self._time_range = time_range
 
-    def __getattr__(self, attr):
-        return getattr(self.item, attr)
-
     def serialize(self):
         if self._text is None:
             try:

+ 1 - 1
radicale/xmlutils.py

@@ -195,7 +195,7 @@ def _comp_match(item, filter_, level=0):
         return True
     # Point #3 and #4 of rfc4791-9.7.1
     components = ([item.item] if level == 0
-                  else list(getattr(item, "%s_list" % tag.lower())))
+                  else list(getattr(item.item, "%s_list" % tag.lower())))
     for child in filter_:
         if child.tag == _tag("C", "prop-filter"):
             if not any(_prop_match(comp, child, "C")