This commit is contained in:
Guillaume Ayoub 2013-02-27 10:36:54 +01:00
parent 56b033bba3
commit b6b48b5af7

View File

@ -197,16 +197,14 @@ def propfind(path, xml_request, collections, user=None):
# Reading request # Reading request
if xml_request: if xml_request:
root = ET.fromstring(xml_request.encode("utf8")) root = ET.fromstring(xml_request.encode("utf8"))
props = [prop.tag for prop in root.find(_tag("D", "prop"))]
prop_element = root.find(_tag("D", "prop"))
props = [prop.tag for prop in prop_element]
else: else:
props = [ _tag("D", "getcontenttype"), props = [_tag("D", "getcontenttype"),
_tag("D", "resourcetype"), _tag("D", "resourcetype"),
_tag("D", "displayname"), _tag("D", "displayname"),
_tag("D", "owner"), _tag("D", "owner"),
_tag("D", "getetag"), _tag("D", "getetag"),
_tag("CS", "getctag") ] _tag("CS", "getctag")]
# Writing answer # Writing answer
multistatus = ET.Element(_tag("D", "multistatus")) multistatus = ET.Element(_tag("D", "multistatus"))