Removed unnecessary check in KNOT api

parent 94ff2e0a
...@@ -244,14 +244,13 @@ class KnotConfig(KnotCtl): ...@@ -244,14 +244,13 @@ class KnotConfig(KnotCtl):
raise KnotApiError("Knot socket is closed") raise KnotApiError("Knot socket is closed")
resp_list = [] resp_list = []
if value is not None: for data_item in value:
for data_item in value: self.send_block("conf-set", section=section, identifier=identifier, item=item, data=data_item)
self.send_block("conf-set", section=section, identifier=identifier, item=item, data=data_item) try:
try: resp = self.receive_block()
resp = self.receive_block() resp_list.append(resp)
resp_list.append(resp) except Exception as e:
except Exception as e: raise KnotInternalError(str(e))
raise KnotInternalError(str(e))
return resp_list 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