From e043fab3a05d686a48f0e22ea6c102e94cb36a0e Mon Sep 17 00:00:00 2001
From: Jeffrey Zhang <jeffrey.zhang@99cloud.net>
Date: Tue, 26 Apr 2016 10:39:25 +0800
Subject: [PATCH] Catch all the exception in the push thread

Change-Id: I1ba48cd25e529bdd846d3ded1f5923f312e5d17d
Closes-Bug: #1574931
---
 kolla/cmd/build.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py
index 477d85c184..10208334b2 100755
--- a/kolla/cmd/build.py
+++ b/kolla/cmd/build.py
@@ -102,6 +102,9 @@ class PushThread(threading.Thread):
                               ' have the correct privileges to run Docker'
                               ' (root)', image['name'])
                 image['status'] = "connection_error"
+            except Exception:
+                LOG.exception('%s:Unknown error when pushing', image['name'])
+                image['status'] = "push_error"
             finally:
                 if "error" not in image['status']:
                     LOG.info('%s:Pushed successfully', image['name'])