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)