From 39fb229ef1d5ba05f9ced53f04c69d6ec66b9ff6 Mon Sep 17 00:00:00 2001 From: tkucherera Date: Thu, 2 May 2024 10:29:20 -0400 Subject: [PATCH] check update args before setting anything --- confluent_client/confluent/client.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/confluent_client/confluent/client.py b/confluent_client/confluent/client.py index a7c13cd3..f9887d4e 100644 --- a/confluent_client/confluent/client.py +++ b/confluent_client/confluent/client.py @@ -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)