docker bugfixes: trim whitespace around list param elements, handle list params being coerced to int or long type
This commit is contained in:
parent
2ddb251538
commit
7bba229838
1 changed files with 4 additions and 2 deletions
|
@ -395,8 +395,10 @@ class DockerManager:
|
||||||
"""
|
"""
|
||||||
param_list = self.module.params.get(param_name)
|
param_list = self.module.params.get(param_name)
|
||||||
if not isinstance(param_list, list):
|
if not isinstance(param_list, list):
|
||||||
param_list = param_list.split(delimiter)
|
# if param_list is a number, like 3333, this will fail, so we coerce to a str first
|
||||||
return param_list
|
param_list = str(param_list).split(delimiter)
|
||||||
|
# whitespace in between commas will cause problems if we don't strip each param
|
||||||
|
return [param.strip() for param in param_list]
|
||||||
|
|
||||||
|
|
||||||
def get_exposed_ports(self, expose_list):
|
def get_exposed_ports(self, expose_list):
|
||||||
|
|
Loading…
Reference in a new issue