瀏覽代碼

Add simple support for calendar-user-address-set (references #181)

Guillaume Ayoub 15 年之前
父節點
當前提交
9874129bbb
共有 1 個文件被更改,包括 4 次插入5 次删除
  1. 4 5
      radicale/xmlutils.py

+ 4 - 5
radicale/xmlutils.py

@@ -140,11 +140,10 @@ def propfind(path, xml_request, calendar, depth):
                 tag = ET.Element(_tag("D", "href"))
                 tag.text = path
                 element.append(tag)
-            elif tag == _tag("D", "principal-collection-set"):
-                tag = ET.Element(_tag("D", "href"))
-                tag.text = path
-                element.append(tag)
-            elif tag == _tag("C", "calendar-home-set"):
+            elif tag in (
+                _tag("D", "principal-collection-set"),
+                _tag("C", "calendar-user-address-set"),
+                _tag("C", "calendar-home-set")):
                 tag = ET.Element(_tag("D", "href"))
                 tag.text = path
                 element.append(tag)