diff options
| author | AAGaming <aagaming@riseup.net> | 2023-12-31 20:29:19 -0500 |
|---|---|---|
| committer | AAGaming <aagaming@riseup.net> | 2023-12-31 20:29:19 -0500 |
| commit | c5ea95a787565e56bce6d50b52cecef85ad5d177 (patch) | |
| tree | bd5b6d44cf09ab7271e95e41dd3dcefd3c0c5ffe /backend/decky_loader/utilities.py | |
| parent | db96121304e78ceb00f1db0eab5a2f098a6f419b (diff) | |
| download | decky-loader-c5ea95a787565e56bce6d50b52cecef85ad5d177.tar.gz decky-loader-c5ea95a787565e56bce6d50b52cecef85ad5d177.zip | |
finalize api for plugin events in backend
just need frontend impl now
Diffstat (limited to 'backend/decky_loader/utilities.py')
| -rw-r--r-- | backend/decky_loader/utilities.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/backend/decky_loader/utilities.py b/backend/decky_loader/utilities.py index 774f47db..05f440a1 100644 --- a/backend/decky_loader/utilities.py +++ b/backend/decky_loader/utilities.py @@ -1,14 +1,13 @@ from __future__ import annotations from os import stat_result import uuid -from json.decoder import JSONDecodeError from os.path import splitext import re from traceback import format_exc from stat import FILE_ATTRIBUTE_HIDDEN # type: ignore from asyncio import StreamReader, StreamWriter, start_server, gather, open_connection -from aiohttp import ClientSession, web +from aiohttp import ClientSession from typing import TYPE_CHECKING, Callable, Coroutine, Dict, Any, List, TypedDict from logging import getLogger @@ -30,7 +29,7 @@ class FilePickerObj(TypedDict): class Utilities: def __init__(self, context: PluginManager) -> None: self.context = context - self.util_methods: Dict[str, Callable[..., Coroutine[Any, Any, Any]]] = { + self.legacy_util_methods: Dict[str, Callable[..., Coroutine[Any, Any, Any]]] = { "ping": self.ping, "http_request": self.http_request, "install_plugin": self.install_plugin, @@ -84,7 +83,7 @@ class Utilities: self.logger.debug(f"Calling utility {method_name} with legacy kwargs"); res: Dict[Any, Any] = {} try: - r = await self.util_methods[method_name](**kwargs) + r = await self.legacy_util_methods[method_name](**kwargs) res["result"] = r res["success"] = True except Exception as e: |
