mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-14 11:24:31 +02:00
fixed api lock for run_script
This commit is contained in:
parent
5d01524e0e
commit
46f7c582ab
1 changed files with 1 additions and 1 deletions
|
@ -325,6 +325,7 @@ class MikrotikAPI:
|
||||||
if response is None:
|
if response is None:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
self.lock.acquire()
|
||||||
for tmp in response:
|
for tmp in response:
|
||||||
if "name" not in tmp:
|
if "name" not in tmp:
|
||||||
continue
|
continue
|
||||||
|
@ -333,7 +334,6 @@ class MikrotikAPI:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
entry_found = True
|
entry_found = True
|
||||||
self.lock.acquire()
|
|
||||||
try:
|
try:
|
||||||
run = response("run", **{".id": tmp[".id"]})
|
run = response("run", **{".id": tmp[".id"]})
|
||||||
tuple(run)
|
tuple(run)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue