Enhance readability according to PEP8

This commit is contained in:
Guillaume Ayoub 2012-08-03 14:08:11 +02:00
parent f593ab0fbd
commit 7ae764fd4b
3 changed files with 16 additions and 18 deletions

View File

@ -68,10 +68,10 @@ INITIAL_CONFIG = {
"courier_socket": ""},
"storage": {
"type": "filesystem",
"filesystem_folder":
os.path.expanduser("~/.config/radicale/collections"),
"git_folder":
os.path.expanduser("~/.config/radicale/collections")},
"filesystem_folder": os.path.expanduser(
"~/.config/radicale/collections"),
"git_folder": os.path.expanduser(
"~/.config/radicale/collections")},
"logging": {
"config": "/etc/radicale/logging",
"debug": "False",

View File

@ -239,8 +239,7 @@ def _propfind_response(path, item, props, user):
tag = ET.Element(_tag("D", "href"))
tag.text = path
element.append(tag)
elif tag in (
_tag("D", "principal-collection-set"),
elif tag in (_tag("D", "principal-collection-set"),
_tag("C", "calendar-user-address-set"),
_tag("CR", "addressbook-home-set"),
_tag("C", "calendar-home-set")):
@ -425,8 +424,7 @@ def report(path, xml_request, collection):
props = [prop.tag for prop in prop_element]
if collection:
if root.tag in (
_tag("C", "calendar-multiget"),
if root.tag in (_tag("C", "calendar-multiget"),
_tag("CR", "addressbook-multiget")):
# Read rfc4791-7.9 for info
hreferences = set(
@ -485,8 +483,8 @@ def report(path, xml_request, collection):
element = ET.Element(tag)
if tag == _tag("D", "getetag"):
element.text = item.etag
elif tag in (
_tag("C", "calendar-data"), _tag("CR", "address-data")):
elif tag in (_tag("C", "calendar-data"),
_tag("CR", "address-data")):
if isinstance(item, ical.Component):
element.text = ical.serialize(
collection_tag, collection_headers,