mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Use % instead of format for consistency (and Python 2.6 support)
This commit is contained in:
parent
dd6063ccb6
commit
e9935ae1a6
2 changed files with 5 additions and 6 deletions
|
@ -224,7 +224,7 @@ def _propfind_response(path, item, props, user):
|
|||
if item.owner_url:
|
||||
tag.text = item.owner_url
|
||||
elif user:
|
||||
tag.text = '/{}/'.format(user)
|
||||
tag.text = '/%s/' % user
|
||||
else:
|
||||
tag.text = path
|
||||
element.append(tag)
|
||||
|
@ -245,7 +245,7 @@ def _propfind_response(path, item, props, user):
|
|||
# pylint: enable=W0511
|
||||
elif tag == _tag("D", "current-user-principal") and user:
|
||||
tag = ET.Element(_tag("D", "href"))
|
||||
tag.text = '/{}/'.format(user)
|
||||
tag.text = '/%s/' % user
|
||||
element.append(tag)
|
||||
elif tag == _tag("D", "current-user-privilege-set"):
|
||||
privilege = ET.Element(_tag("D", "privilege"))
|
||||
|
@ -283,8 +283,7 @@ def _propfind_response(path, item, props, user):
|
|||
is404 = True
|
||||
# Not for calendars
|
||||
elif tag == _tag("D", "getcontenttype"):
|
||||
element.text = \
|
||||
"text/calendar; component={}".format(item.tag.lower())
|
||||
element.text = "text/calendar; component=%s" % item.tag.lower()
|
||||
else:
|
||||
is404 = True
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue