|
|
@@ -34,20 +34,15 @@ import xml.etree.ElementTree as ET
|
|
|
from radicale import client, config, ical
|
|
|
|
|
|
|
|
|
-# TODO: This is a well-known and accepted hack for ET to avoid ET from renaming
|
|
|
-# namespaces, which is accepted in XML norm but often not in XML
|
|
|
-# readers. Is there another clean solution to force namespaces?
|
|
|
-PROTECTED_NAMESPACES = {
|
|
|
+NAMESPACES = {
|
|
|
"C": "urn:ietf:params:xml:ns:caldav",
|
|
|
"D": "DAV:",
|
|
|
"CS": "http://calendarserver.org/ns/"}
|
|
|
-for key, value in PROTECTED_NAMESPACES.items():
|
|
|
- ET._namespace_map[value] = key
|
|
|
|
|
|
|
|
|
def _tag(short_name, local):
|
|
|
"""Get XML Clark notation {uri(``short_name``)}``local``."""
|
|
|
- return "{%s}%s" % (PROTECTED_NAMESPACES[short_name], local)
|
|
|
+ return "{%s}%s" % (NAMESPACES[short_name], local)
|
|
|
|
|
|
|
|
|
def _response(code):
|