From 129cefbe7df516cb9229156c4cbfb8c50a82727b Mon Sep 17 00:00:00 2001 From: Caleb Lemoine <21261388+circa10a@users.noreply.github.com> Date: Fri, 22 Feb 2019 20:12:48 -0600 Subject: [PATCH] catch attribute errors when comparing image digests (#237) --- pyouroboros/dockerclient.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pyouroboros/dockerclient.py b/pyouroboros/dockerclient.py index 7f3d8c99..ff7f5f1f 100644 --- a/pyouroboros/dockerclient.py +++ b/pyouroboros/dockerclient.py @@ -249,10 +249,13 @@ def socket_check(self): latest_image = self.pull(current_tag) except ConnectionError: continue - if current_image.id != latest_image.id: - updateable.append((container, current_image, latest_image)) - else: - continue + try: + if current_image.id != latest_image.id: + updateable.append((container, current_image, latest_image)) + else: + continue + except AttributeError: + self.logger.error("Issue detecting %s's image tag. Skipping...", container.name) # Get container list to restart after update complete depends_on = container.labels.get('com.ouroboros.depends_on', False)