Small style fixes

This commit is contained in:
Guillaume Ayoub 2015-05-01 10:31:25 +02:00
parent 675f9d1f87
commit ced7e76ba0

View File

@ -466,7 +466,9 @@ def report(path, xml_request, collection):
root = ET.fromstring(xml_request.encode("utf8")) root = ET.fromstring(xml_request.encode("utf8"))
prop_element = root.find(_tag("D", "prop")) prop_element = root.find(_tag("D", "prop"))
props = [prop.tag for prop in prop_element] if prop_element is not None else [] props = (
[prop.tag for prop in prop_element]
if prop_element is not None else [])
if collection: if collection:
if root.tag in (_tag("C", "calendar-multiget"), if root.tag in (_tag("C", "calendar-multiget"),
@ -507,8 +509,8 @@ def report(path, xml_request, collection):
try: try:
items = [collection.items[name]] items = [collection.items[name]]
except KeyError: except KeyError:
multistatus.append(_item_response(hreference, multistatus.append(
found_item=False)) _item_response(hreference, found_item=False))
continue continue
else: else:
@ -543,8 +545,8 @@ def report(path, xml_request, collection):
else: else:
not_found_props.append(element) not_found_props.append(element)
multistatus.append(_item_response(href, found_props=found_props, multistatus.append(_item_response(
not_found_props=not_found_props, href, found_props=found_props, not_found_props=not_found_props,
found_item=True)) found_item=True))
return _pretty_xml(multistatus) return _pretty_xml(multistatus)