Catch all the exception in the push thread

Change-Id: I1ba48cd25e529bdd846d3ded1f5923f312e5d17d
Closes-Bug: #1574931
This commit is contained in:
Jeffrey Zhang 2016-04-26 10:39:25 +08:00
parent 2705d67fa1
commit e043fab3a0

View File

@ -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'])