Create config in list_containers

This commit is contained in:
Einar Forselv 2019-04-16 18:22:03 +02:00
parent 9d3d87d9d5
commit ac33ee39dd
1 changed files with 2 additions and 1 deletions

View File

@ -5,7 +5,8 @@ from restic_volume_backup.config import Config
def list_containers():
"""Easily mockable container list"""
client = docker.Client(base_url=Config.docker_base_url)
config = Config()
client = docker.Client(base_url=config.docker_base_url)
all_containers = client.containers()
client.close()
return all_containers