Fix radicale patch.

This commit is contained in:
Gabriel Ebner 2022-09-28 18:16:45 -07:00
parent 4d3b6bcba4
commit 048e8daf96
2 changed files with 10 additions and 14 deletions

@ -6,7 +6,9 @@ in
services.radicale = { services.radicale = {
enable = true; enable = true;
package = pkgs.radicale3.overrideDerivation (_: { package = pkgs.radicale3.overrideDerivation (_: {
#patches = [ ./radicale1249.patch ]; patches = [ ./radicale1249.patch ];
doCheck = false;
pytestCheckPhase = "true";
}); });
settings = { settings = {
server = { server = {

@ -1,7 +1,8 @@
diff -urN radicale/app/propfind.py radicale/app/propfind.py diff --git a/radicale/app/propfind.py b/radicale/app/propfind.py
--- radicale/app/propfind.py 2022-04-20 17:57:41.000000000 +0200 index 52d0b00..ee7cf28 100644
+++ radicale/app/propfind.py 2022-06-01 07:33:33.000000000 +0200 --- a/radicale/app/propfind.py
@@ -350,8 +350,8 @@ +++ b/radicale/app/propfind.py
@@ -350,8 +350,8 @@ class ApplicationPartPropfind(ApplicationBase):
permission = "r" permission = "r"
status = "read" status = "read"
else: else:
@ -12,7 +13,7 @@ diff -urN radicale/app/propfind.py radicale/app/propfind.py
logger.debug( logger.debug(
"%s has %s access to %s", "%s has %s access to %s",
repr(user) if user else "anonymous user", status, target) repr(user) if user else "anonymous user", status, target)
@@ -362,8 +362,8 @@ @@ -362,8 +362,8 @@ class ApplicationPartPropfind(ApplicationBase):
path: str, user: str) -> types.WSGIResponse: path: str, user: str) -> types.WSGIResponse:
"""Manage PROPFIND request.""" """Manage PROPFIND request."""
access = Access(self._rights, user, path) access = Access(self._rights, user, path)
@ -23,7 +24,7 @@ diff -urN radicale/app/propfind.py radicale/app/propfind.py
try: try:
xml_content = self._read_xml_request_body(environ) xml_content = self._read_xml_request_body(environ)
except RuntimeError as e: except RuntimeError as e:
@@ -380,8 +380,8 @@ @@ -380,8 +380,8 @@ class ApplicationPartPropfind(ApplicationBase):
item = next(items_iter, None) item = next(items_iter, None)
if not item: if not item:
return httputils.NOT_FOUND return httputils.NOT_FOUND
@ -34,10 +35,3 @@ diff -urN radicale/app/propfind.py radicale/app/propfind.py
# put item back # put item back
items_iter = itertools.chain([item], items_iter) items_iter = itertools.chain([item], items_iter)
allowed_items = self._collect_allowed_items(items_iter, user) allowed_items = self._collect_allowed_items(items_iter, user)
@@ -390,5 +390,6 @@
xml_answer = xml_propfind(base_prefix, path, xml_content,
allowed_items, user, self._encoding)
if xml_answer is None:
+ logger.warning("xml_propfind returned no answer")
return httputils.NOT_ALLOWED
return client.MULTI_STATUS, headers, self._xml_response(xml_answer)