2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-12-25 12:41:39 +00:00

Only show error message when errors exist

This commit is contained in:
Jarrod Johnson 2017-07-26 16:37:09 -04:00
parent 7a88a2825d
commit 12d0fe21cd

View File

@ -116,7 +116,9 @@ def update_firmware(session, filename):
output.set_output(node, progress)
time.sleep(2)
allerrnodes = ','.join(noderrs)
sys.stderr.write('Nodes had errors updating ({0})!\n'.format(allerrnodes))
if noderrs:
sys.stderr.write(
'Nodes had errors updating ({0})!\n'.format(allerrnodes))
for node in noderrs:
sys.stderr.write('{0}: {1}\n'.format(node, noderrs[node]))