fixed api lock for run_script

This commit is contained in:
tomaae 2020-04-20 10:54:54 +02:00
parent 5d01524e0e
commit 46f7c582ab

View file

@ -325,6 +325,7 @@ class MikrotikAPI:
if response is None:
return False
self.lock.acquire()
for tmp in response:
if "name" not in tmp:
continue
@ -333,7 +334,6 @@ class MikrotikAPI:
continue
entry_found = True
self.lock.acquire()
try:
run = response("run", **{".id": tmp[".id"]})
tuple(run)