Fix FutureWarning, explicitly test prop_element for None

This commit is contained in:
Jochen Sprickerhof 2015-01-23 14:41:41 +01:00
parent 727b686089
commit c43b473c4a

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"),