aboutsummaryrefslogtreecommitdiff
path: root/kolla
diff options
context:
space:
mode:
authorMichal Rostecki <mrostecki@mirantis.com>2016-01-06 20:26:44 +0100
committerMichal Rostecki <mrostecki@mirantis.com>2016-01-06 20:29:55 +0100
commit7137212ab24c032311906aa774c057b3e8929971 (patch)
tree64187aeb9905d4e3946a41d9d14640ce8a0425c0 /kolla
parentecfc955a7ebf7b5ca630caf51b8d180f2e0af7e0 (diff)
downloadkolla-7137212ab24c032311906aa774c057b3e8929971.tar.gz
kolla-7137212ab24c032311906aa774c057b3e8929971.zip
Log information about successful push only if it really is
The try-except-finally block in push thread was catching only ConnectionError and logging information about successful push even if some other error occured during push. TrivialFix Change-Id: I94f5ed67237d291701469a65f76146881cd67a35
Diffstat (limited to 'kolla')
-rwxr-xr-xkolla/cmd/build.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py
index 20fc38554..f1b362b8c 100755
--- a/kolla/cmd/build.py
+++ b/kolla/cmd/build.py
@@ -83,13 +83,14 @@ class PushThread(Thread):
image = self.queue.get()
LOG.debug('%s:Try to push the image', image['name'])
self.push_image(image)
- LOG.info('%s:Pushed successfully', image['name'])
except ConnectionError:
LOG.exception('%s:Make sure Docker is running and that you'
' have the correct privileges to run Docker'
' (root)', image['name'])
image['status'] = "connection_error"
finally:
+ if "error" not in image['status']:
+ LOG.info('%s:Pushed successfully', image['name'])
self.queue.task_done()
def push_image(self, image):