podman_container: only add --volume if item not empty
Make sure the item in the list of volumes isn't empty or we can end up with a user error where the item is '' and podman will crash with: "host directory can not be empty" Note that I hit that since we have some conditional volumes in THT, where sometimes we get '' in the list of volumes. Let's handle this case. Change-Id: I8df1fb5d1bb72bd492e9f8e2b29dc6dae09d6b44
This commit is contained in:
parent
7fa3b4ebae
commit
ded2a17538
|
@ -1147,6 +1147,7 @@ class PodmanModuleParams:
|
|||
|
||||
def addparam_volume(self, c):
|
||||
for vol in self.params['volume']:
|
||||
if vol:
|
||||
c += ['--volume', vol]
|
||||
return c
|
||||
|
||||
|
|
Loading…
Reference in New Issue