From daa6b8208c9ee61522010401758108ce8e5b9de5 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 25 Jan 2022 11:09:49 -0500 Subject: [PATCH] Handle update being cancelled server side The result may not be a nicely formed result, handle less formed results. --- confluent_client/bin/nodefirmware | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/confluent_client/bin/nodefirmware b/confluent_client/bin/nodefirmware index b053c0cb..465314d7 100755 --- a/confluent_client/bin/nodefirmware +++ b/confluent_client/bin/nodefirmware @@ -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: