remove extra arg

This commit is contained in:
Dillon DuPont
2025-05-15 15:19:30 -04:00
parent d7c1988381
commit 667be22ee5

View File

@@ -19,10 +19,13 @@ class MacOSDioramaHandler(BaseDioramaHandler):
if not hasattr(interface, action):
return {"success": False, "error": f"Unknown diorama action: {action}"}
method = getattr(interface, action)
# Remove app_list from arguments before calling the method
filtered_arguments = dict(arguments)
filtered_arguments.pop("app_list", None)
if inspect.iscoroutinefunction(method):
result = await method(**(arguments or {}))
result = await method(**(filtered_arguments or {}))
else:
result = method(**(arguments or {}))
result = method(**(filtered_arguments or {}))
return {"success": True, "result": result}
except Exception as e:
import traceback