1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-10 18:40:53 +00:00

Mark attributes for internal use with underscore

This commit is contained in:
Unrud 2020-01-14 06:19:11 +01:00
parent 9b51e495ea
commit 1453c0b72c
11 changed files with 77 additions and 74 deletions

View file

@ -51,8 +51,8 @@ class ApplicationDeleteMixin:
"""Manage DELETE request."""
if not self.access(user, path, "w"):
return httputils.NOT_ALLOWED
with self.storage.acquire_lock("w", user):
item = next(self.storage.discover(path), None)
with self._storage.acquire_lock("w", user):
item = next(self._storage.discover(path), None)
if not item:
return httputils.NOT_FOUND
if not self.access(user, path, "w", item):
@ -66,5 +66,5 @@ class ApplicationDeleteMixin:
else:
xml_answer = xml_delete(
base_prefix, path, item.collection, item.href)
headers = {"Content-Type": "text/xml; charset=%s" % self.encoding}
headers = {"Content-Type": "text/xml; charset=%s" % self._encoding}
return client.OK, headers, self.write_xml_content(xml_answer)