1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-06-26 16:45:52 +00:00

Check cache lock name space for '/'

This commit is contained in:
Unrud 2018-04-29 21:37:37 +02:00
parent 5adcab77a3
commit d2811b7fa5

View file

@ -1311,6 +1311,8 @@ class Collection(BaseCollection):
@contextmanager
def _acquire_cache_lock(self, ns=""):
if "/" in ns:
raise ValueError("ns must not include '/'")
with contextlib.ExitStack() as lock_stack:
with contextlib.ExitStack() as locks_lock_stack:
locks_lock_stack.enter_context(self._cache_locks_lock)