From 3e6b67f9a754a69b53cc1ec129087df5ac32ebee Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 14 Feb 2022 09:24:15 -0500 Subject: [PATCH] Error if user omits attributes for options If user indicates manipulation of attributes through -c, -p, or -e, but none are specified, print an error instead. --- confluent_client/bin/nodeattrib | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/confluent_client/bin/nodeattrib b/confluent_client/bin/nodeattrib index 63443a08..4ed96406 100755 --- a/confluent_client/bin/nodeattrib +++ b/confluent_client/bin/nodeattrib @@ -105,7 +105,10 @@ if len(args) > 1: requestargs=args[1:] except: pass - +elif options.clear or options.environment or options.prompt: + sys.stderr.write('Attribute names required with specified options\n') + argparser.print_help() + exitcode = 400 if exitcode != 0: sys.exit(exitcode)