This commit is contained in:
Tomaae 2023-08-31 02:53:34 +02:00
commit c8728238af
No known key found for this signature in database
GPG key ID: 2F97770867DAA4E6
10 changed files with 142 additions and 19 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))