Merge pull request #255 from jspricke/fix_FutureWarning

Fix FutureWarning, explicitly test prop_element for None
This commit is contained in:
Guillaume Ayoub 2015-05-01 10:22:38 +02:00
commit 675f9d1f87

View File

@ -466,7 +466,7 @@ def report(path, xml_request, collection):
root = ET.fromstring(xml_request.encode("utf8"))
prop_element = root.find(_tag("D", "prop"))
props = [prop.tag for prop in prop_element] if prop_element else []
props = [prop.tag for prop in prop_element] if prop_element is not None else []
if collection:
if root.tag in (_tag("C", "calendar-multiget"),