From 0d8fa5db6b103fe2c6e5919eb2357ae203836174 Mon Sep 17 00:00:00 2001 From: Lukasz Langa Date: Tue, 10 May 2011 14:21:13 +0200 Subject: [PATCH] More deprecation fixes xmlutils.py:116: DeprecationWarning: This method will be removed in future versions. Use 'list(elem)' or iteration over elem instead. prop_list = prop_element.getchildren() --- radicale/xmlutils.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/radicale/xmlutils.py b/radicale/xmlutils.py index 01a3a07..0efe37e 100644 --- a/radicale/xmlutils.py +++ b/radicale/xmlutils.py @@ -113,9 +113,8 @@ def propfind(path, xml_request, calendar, depth): root = ET.fromstring(xml_request) prop_element = root.find(_tag("D", "prop")) - prop_list = prop_element.getchildren() - props = [prop.tag for prop in prop_list] - + props = [prop.tag for prop in prop_element] + # Writing answer multistatus = ET.Element(_tag("D", "multistatus")) @@ -222,8 +221,7 @@ def proppatch(path, xml_request, calendar): action_element = root.find(_tag("D", action)) if action_element is not None: prop_element = action_element.find(_tag("D", "prop")) - prop_list = prop_element.getchildren() - props.extend(prop.tag for prop in prop_list) + props.extend(prop.tag for prop in prop_element) # Writing answer multistatus = ET.Element(_tag("D", "multistatus")) @@ -276,8 +274,7 @@ def report(path, xml_request, calendar): root = ET.fromstring(xml_request) prop_element = root.find(_tag("D", "prop")) - prop_list = prop_element.getchildren() - props = [prop.tag for prop in prop_list] + props = [prop.tag for prop in prop_element] if calendar: if root.tag == _tag("C", "calendar-multiget"):