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
This commit is contained in:
parent
ecfc955a7e
commit
7137212ab2
@ -83,13 +83,14 @@ class PushThread(Thread):
|
|||||||
image = self.queue.get()
|
image = self.queue.get()
|
||||||
LOG.debug('%s:Try to push the image', image['name'])
|
LOG.debug('%s:Try to push the image', image['name'])
|
||||||
self.push_image(image)
|
self.push_image(image)
|
||||||
LOG.info('%s:Pushed successfully', image['name'])
|
|
||||||
except ConnectionError:
|
except ConnectionError:
|
||||||
LOG.exception('%s:Make sure Docker is running and that you'
|
LOG.exception('%s:Make sure Docker is running and that you'
|
||||||
' have the correct privileges to run Docker'
|
' have the correct privileges to run Docker'
|
||||||
' (root)', image['name'])
|
' (root)', image['name'])
|
||||||
image['status'] = "connection_error"
|
image['status'] = "connection_error"
|
||||||
finally:
|
finally:
|
||||||
|
if "error" not in image['status']:
|
||||||
|
LOG.info('%s:Pushed successfully', image['name'])
|
||||||
self.queue.task_done()
|
self.queue.task_done()
|
||||||
|
|
||||||
def push_image(self, image):
|
def push_image(self, image):
|
||||||
|
Loading…
Reference in New Issue
Block a user