diff --git a/source/binding/Python/maa/controller.py b/source/binding/Python/maa/controller.py index bc8360f55..3a0970805 100644 --- a/source/binding/Python/maa/controller.py +++ b/source/binding/Python/maa/controller.py @@ -51,7 +51,7 @@ async def connect(self) -> bool: :return: True if the connection was successful, False otherwise. """ - await self.post_connection().wait() + return await self.post_connection().wait() def post_connection(self) -> Future: """ diff --git a/source/binding/Python/maa/instance.py b/source/binding/Python/maa/instance.py index 3e4e9a6a8..110959252 100644 --- a/source/binding/Python/maa/instance.py +++ b/source/binding/Python/maa/instance.py @@ -79,7 +79,7 @@ async def run_task(self, task_type: str, param: Dict = {}) -> bool: :return: True if the task was successfully run, False otherwise. """ - await self.post_task(task_type, param).wait() + return await self.post_task(task_type, param).wait() def post_task(self, task_type: str, param: Any = {}) -> Future: """ @@ -119,7 +119,7 @@ async def stop(self) -> bool: :return: True if all tasks were successfully stopped, False otherwise. """ - await self.post_stop().wait() + return await self.post_stop().wait() def post_stop(self) -> Future: """ diff --git a/source/binding/Python/maa/resource.py b/source/binding/Python/maa/resource.py index 89f732c17..895e1a13f 100644 --- a/source/binding/Python/maa/resource.py +++ b/source/binding/Python/maa/resource.py @@ -51,7 +51,7 @@ async def load(self, path: Union[pathlib.Path, str]) -> bool: :return: True if the resource was successfully loaded, False otherwise. """ - await self.post_path(path).wait() + return await self.post_path(path).wait() def post_path(self, path: Union[pathlib.Path, str]) -> Future: """