outposts: fix possible recursion error in docker controller

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-05-30 15:26:20 +02:00
parent fb6242d2d3
commit 72f5a4c460
1 changed files with 3 additions and 0 deletions

View File

@ -81,9 +81,12 @@ class DockerController(BaseController):
True,
)
# pylint: disable=too-many-return-statements
def up(self):
try:
container, has_been_created = self._get_container()
if has_been_created:
return None
# Check if the container is out of date, delete it and retry
if len(container.image.tags) > 0:
tag: str = container.image.tags[0]