2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-24 18:41:55 +00:00

check update args before setting anything

This commit is contained in:
tkucherera 2024-05-02 10:29:20 -04:00
parent 60f8f964f5
commit 39fb229ef1

View File

@ -705,6 +705,14 @@ def updateattrib(session, updateargs, nodetype, noderange, options, dictassign=N
noderange, 'attributes/all', dictassign[key], key)
else:
if "=" in updateargs[1]:
update_ready = True
for arg in updateargs[1:]:
if not '=' in arg:
update_ready = False
sys.stderr.write('Error: {0} not a valid expression\n'.format(str(arg)))
exitcode = 1
if not update_ready:
sys.exit(exitcode)
try:
for val in updateargs[1:]:
val = val.split('=', 1)