fix error in read docker

This commit is contained in:
nutzer26
2022-12-16 16:00:13 +01:00
parent 1e9fec902f
commit 0ba28316d1

View File

@@ -9,10 +9,10 @@ import docker
def show_docker_con_img(input): def show_docker_con_img(input):
output_list = [] output_list = []
client = docker.from_env() client = docker.from_env()
if input == "images": if str(input) == "images":
search_query = "RepoTags" search_query = "RepoTags"
test = 'client.' + input + '.list(all=True)' test = 'client.' + input + '.list(all=False)'
if input == "containers": elif input == "containers":
search_query = "Id" search_query = "Id"
test = 'client.' + input + '.list(all=True)' test = 'client.' + input + '.list(all=True)'
else: else: