mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #12341 from natefoo/fix-empty-container-volumes
[21.05] Fix for empty docker_volumes/singularity_volumes in job config
This commit is contained in:
@@ -117,6 +117,10 @@ def preprocess_volumes(volumes_raw_str, container_type):
|
||||
ro for Singularity iff no subdirectories are rw (Singularity does not allow ro
|
||||
parent directories with rw subdirectories).
|
||||
|
||||
>>> preprocess_volumes(None, DOCKER_CONTAINER_TYPE)
|
||||
[]
|
||||
>>> preprocess_volumes("", DOCKER_CONTAINER_TYPE)
|
||||
[]
|
||||
>>> preprocess_volumes("/a/b", DOCKER_CONTAINER_TYPE)
|
||||
['/a/b:rw']
|
||||
>>> preprocess_volumes("/a/b:ro,/a/b/c:rw", DOCKER_CONTAINER_TYPE)
|
||||
@@ -131,6 +135,9 @@ def preprocess_volumes(volumes_raw_str, container_type):
|
||||
['/a/b', '/a/b/c']
|
||||
"""
|
||||
|
||||
if not volumes_raw_str:
|
||||
return []
|
||||
|
||||
volumes_raw_strs = [v.strip() for v in volumes_raw_str.split(",")]
|
||||
volumes = []
|
||||
rw_paths = []
|
||||
|
||||
Reference in New Issue
Block a user