tripleo-container-image-prepare/logging: fix exception formating
It happens that the remote registry returns 401 and we want to log an exception but the formating wasn't converted to strings. So we had this error: TypeError: not all arguments converted during string formatting With this patch, we use {} code and the .format method to make sure that the exception will be composed of strings only. Note: it doesn't fix the root cause of the 401 error reported in bug 1819632 but it should help to figure it out with proper logging. Change-Id: Idad301b6da30143827da1cfc8083f460073442fe Related-Bug: #1819632
This commit is contained in:
parent
3f5b75bd47
commit
d6abcac8dc
@ -133,4 +133,4 @@ if __name__ == '__main__':
|
||||
log.info(result)
|
||||
print(result)
|
||||
except Exception as e:
|
||||
log.exception('Image prepare failed', e)
|
||||
log.exception("Image prepare failed: {}".format(e))
|
||||
|
Loading…
Reference in New Issue
Block a user