From c5ce302717f42def3b2fa395093e6440400d8ade Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 20 Feb 2018 10:17:02 -0500 Subject: [PATCH] Add usage back to nodefirmware If the arguments are fruitless, provide a usage message rather than blank. --- confluent_client/bin/nodefirmware | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/confluent_client/bin/nodefirmware b/confluent_client/bin/nodefirmware index 8cdb61ef..5ac9eba9 100755 --- a/confluent_client/bin/nodefirmware +++ b/confluent_client/bin/nodefirmware @@ -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: