2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-02-14 09:39:51 +00:00

Change to setting an errstr rather than exception

If nodefirmware update has an issue, provide error message instead.
This commit is contained in:
Jarrod Johnson 2018-07-16 09:03:02 -04:00
parent 0016077bee
commit 18f1c07d65

View File

@ -31,9 +31,10 @@ updatepool = eventlet.greenpool.GreenPool(256)
def execupdate(handler, filename, updateobj, type):
if not os.path.exists(filename):
raise exc.InvalidArgumentException(
'{0} does not appear to exist on {1}'.format(filename,
socket.gethostname()))
errstr = '{0} does not appear to exist on {1}'.format(
filename, socket.gethostname())
updateobj.handle_progress({'phase': 'error', 'progress': 0.0,
'detail': errstr})
try:
if type == 'firmware':
completion = handler(filename, progress=updateobj.handle_progress,