2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-11 10:18:00 +00:00

Have node*attrib commands error if user does -c and =

Can't clear and assign in one go, error for user awareness.
This commit is contained in:
Jarrod Johnson 2017-10-19 10:02:30 -04:00
parent 6659b31106
commit 444ba917eb
2 changed files with 8 additions and 0 deletions

View File

@ -63,6 +63,10 @@ nodetype="noderange"
if len(args) > 1:
if "=" in args[1] or options.clear:
if "=" in args[1] and options.clear:
print("Can not clear and set at the same time!")
argparser.print_help()
sys.exit(1)
exitcode=client.updateattrib(session,args,nodetype, noderange, options)
try:
# setting user output to what the user inputs

View File

@ -63,6 +63,10 @@ exitcode = 0
if len(args) > 1:
showtype = 'all'
if "=" in args[1] and options.clear:
print("Can not clear and set at the same time!")
argparser.print_help()
sys.exit(1)
exitcode=client.updateattrib(session,args,nodetype, nodegroups, options)
try:
# setting user output to what the user inputs