Skip to content
Snippets Groups Projects
Verified Commit 987ab12a authored by Jan Pavlíček's avatar Jan Pavlíček
Browse files

fix: containers argument format in check_docker probe

parent 60364d4e
No related branches found
No related tags found
1 merge request!37fix: containers argument format in check_docker probe
Pipeline #305358 passed
...@@ -29,7 +29,8 @@ def get_args(): ...@@ -29,7 +29,8 @@ def get_args():
"-c", "-c",
"--containers", "--containers",
required=True, required=True,
help='list of container names to check in following format: "[cont1, cont2]"', help="list of container names to check in following"
"format: '['cont1', 'cont2']'",
) )
return parser.parse_args() return parser.parse_args()
...@@ -38,6 +39,7 @@ def get_args(): ...@@ -38,6 +39,7 @@ def get_args():
def main(): def main():
args = get_args() args = get_args()
containers_list = args.containers.replace(" ", "").strip("[]").split(",") containers_list = args.containers.replace(" ", "").strip("[]").split(",")
containers_list = [container_name.strip("'") for container_name in containers_list]
containers_status = get_docker_states(containers_list) containers_status = get_docker_states(containers_list)
status = 0 status = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment