mirror of
https://github.com/trycua/computer.git
synced 2026-01-04 12:30:08 -06:00
remove extra arg
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user