Removed unnecessary check in KNOT api

parent 94ff2e0a
......@@ -244,14 +244,13 @@ class KnotConfig(KnotCtl):
raise KnotApiError("Knot socket is closed")
resp_list = []
if value is not None:
for data_item in value:
self.send_block("conf-set", section=section, identifier=identifier, item=item, data=data_item)
try:
resp = self.receive_block()
resp_list.append(resp)
except Exception as e:
raise KnotInternalError(str(e))
for data_item in value:
self.send_block("conf-set", section=section, identifier=identifier, item=item, data=data_item)
try:
resp = self.receive_block()
resp_list.append(resp)
except Exception as e:
raise KnotInternalError(str(e))
return resp_list
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment