refac: added some type checking and fixed a duplicate bug (apparently)

This commit is contained in:
Daan Selen
2025-09-25 09:49:19 +02:00
parent 82cc31e0f6
commit 9d2999476d
4 changed files with 31 additions and 11 deletions
+2 -1
View File
@@ -11,6 +11,7 @@ from modules.utilities import transform
intertask_delay = 1
class executor:
@staticmethod
async def execute_meshbook(args: argparse.Namespace, session: meshctrl.Session, compiled_device_list: dict, meshbook: dict, group_list: dict) -> None:
'''
Actual function that handles meshbook execution, also responsible for formatting the resulting JSON.
@@ -28,7 +29,7 @@ class executor:
if "powershell" in meshbook and meshbook["powershell"]:
response = await session.run_command(nodeids=targets, command=task["command"],powershell=True,ignore_output=False,timeout=900)
else:
response = await session.run_command(nodeids=targets, command=task["command"],ignore_output=False,timeout=900)
response = await session.run_command(nodeids=targets, command=task["command"],powershell=False,ignore_output=False,timeout=900)
task_batch = []
for device in response: