2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 19:10:10 +00:00

Add usage back to nodefirmware

If the arguments are fruitless, provide a usage message rather than
blank.
This commit is contained in:
Jarrod Johnson 2018-02-20 10:17:02 -05:00
parent 22d79598b3
commit c5ce302717

View File

@ -139,6 +139,7 @@ def update_firmware(session, filename):
sys.stderr.write('{0}: {1}\n'.format(node, noderrs[node]))
def show_firmware(session):
firmware_shown = False
for component in components:
for res in session.read(
'/noderange/{0}/inventory/firmware/all/{1}'.format(
@ -152,7 +153,10 @@ def show_firmware(session):
continue
for inv in res['databynode'][node]['firmware']:
for prefix in inv:
firmware_shown = True
printfirm(node, prefix, inv[prefix])
if not firmware_shown:
argparser.print_help()
try: