mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-21 17:11:58 +00:00
check update args before setting anything
This commit is contained in:
parent
60f8f964f5
commit
39fb229ef1
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user