added attributes to execute method, using it on check-for-updates. hardcoded 10 seconds for duration

This commit is contained in:
Ivan Pavlina 2023-05-31 06:56:50 +00:00
parent 251874bdc2
commit 22844e7ae5
2 changed files with 7 additions and 4 deletions

View file

@ -258,7 +258,7 @@ class MikrotikAPI:
# ---------------------------
# execute
# ---------------------------
def execute(self, path, command, param, value) -> bool:
def execute(self, path, command, param, value, attributes=None) -> bool:
"""Execute a command"""
entry_found = None
params = {}
@ -292,6 +292,9 @@ class MikrotikAPI:
params = {".id": entry_found}
if attributes:
params.update(attributes)
self.lock.acquire()
try:
tuple(response(command, **params))