2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 01:22:00 +00:00

Handle update being cancelled server side

The result may not be a nicely formed result, handle less
formed results.
This commit is contained in:
Jarrod Johnson 2022-01-25 11:09:49 -05:00
parent 3f90c35bc9
commit daa6b8208c

View File

@ -88,9 +88,9 @@ client.check_globbing(noderange)
def get_update_progress(session, url):
for res in session.read(url):
status = res['phase']
percent = res['progress']
detail = res['detail']
status = res.get('phase', 'error')
percent = res.get('progress', None)
detail = res.get('detail', repr(res)),
if status == 'error':
text = 'error!'
else: