From f00733199fdd0102fb25fd6166763d0731833169 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Tue, 29 Oct 2024 14:13:27 +0100 Subject: [PATCH] also check for z in the re-duplication code --- lib/galaxy/tool_util/deps/container_volumes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/tool_util/deps/container_volumes.py b/lib/galaxy/tool_util/deps/container_volumes.py index 2e969a3b4b63..1bbe1488b367 100644 --- a/lib/galaxy/tool_util/deps/container_volumes.py +++ b/lib/galaxy/tool_util/deps/container_volumes.py @@ -7,7 +7,7 @@ class ContainerVolume(metaclass=ABCMeta): - valid_modes = frozenset({"ro", "rw"}) + valid_modes = frozenset({"ro", "rw", "z"}) def __init__(self, path: str, host_path: Optional[str] = None, mode: Optional[str] = None): self.path = path @@ -50,7 +50,7 @@ def from_str(cls, as_str: str) -> "DockerVolume": kwds["path"] = kwds["host_path"] elif len(parts) == 2: # /host_path:mode is not (or is no longer?) valid Docker volume syntax - if parts[1] in DockerVolume.valid_modes: + if any(mode_part not in DockerVolume.valid_modes for mode_part in parts[1].split(",")) : kwds["mode"] = parts[1] kwds["path"] = kwds["host_path"] else: