[Calypso] [PATCH 33/35] Support empty PROP requests.

Jelmer Vernooij jelmer at jelmer.uk
Sat Jan 9 11:04:22 PST 2016


From: Jelmer Vernooń≥ <jelmer at samba.org>

---
 calypso/xmlutils.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/calypso/xmlutils.py b/calypso/xmlutils.py
index 08446da..7d78b68 100644
--- a/calypso/xmlutils.py
+++ b/calypso/xmlutils.py
@@ -84,10 +84,14 @@ def propfind(path, xml_request, collection, resource, depth, context):
 
     item_name = paths.resource_from_path(path)
 
-    # Reading request
-    root = ET.fromstring(xml_request)
+    if xml_request:
+        # Reading request
+        root = ET.fromstring(xml_request)
+
+        prop_element = root.find(_tag("D", "prop"))
+    else:
+        prop_element = None
 
-    prop_element = root.find(_tag("D", "prop"))
     if prop_element is not None:
         prop_list = prop_element.getchildren()
         props = [prop.tag for prop in prop_list]
-- 
2.7.0.rc3



More information about the Calypso mailing list