From 86ced93817be52c221b28dd09317abab2115aeb7 Mon Sep 17 00:00:00 2001 From: dirtycajunrice Date: Sun, 20 Jan 2019 13:45:16 -0600 Subject: [PATCH] catch no tags in get_running --- pyouroboros/dockerclient.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyouroboros/dockerclient.py b/pyouroboros/dockerclient.py index d66a7401..5d4ba7fc 100644 --- a/pyouroboros/dockerclient.py +++ b/pyouroboros/dockerclient.py @@ -26,8 +26,12 @@ def get_running(self): if self.config.self_update: running_containers.append(container) else: - if 'ouroboros' not in container.image.tags[0]: - running_containers.append(container) + try: + if 'ouroboros' not in container.image.tags[0]: + running_containers.append(container) + except IndexError: + self.logger.error("%s has no tags.. you should clean it up! Ignoring.", container.id) + continue except DockerException: self.logger.critical("Can't connect to Docker API at %s", self.config.docker_socket)