From d9a5b9def350afdadd634edae6aa9889bb5705e7 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 29 Mar 2024 20:44:16 +0200 Subject: [PATCH] Raise exec exception by default --- platformio/home/rpc/handlers/core.py | 2 +- platformio/home/rpc/handlers/memusage.py | 1 - platformio/home/rpc/handlers/project.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/platformio/home/rpc/handlers/core.py b/platformio/home/rpc/handlers/core.py index 61de1ba1..065f213a 100644 --- a/platformio/home/rpc/handlers/core.py +++ b/platformio/home/rpc/handlers/core.py @@ -73,7 +73,7 @@ class CoreRPC(BaseRPCHandler): def version(): return __version__ - async def exec(self, args, options=None, raise_exception=False): + async def exec(self, args, options=None, raise_exception=True): options = options or {} loop = aio_get_running_loop() exit_future = loop.create_future() diff --git a/platformio/home/rpc/handlers/memusage.py b/platformio/home/rpc/handlers/memusage.py index c8d3edda..12595184 100644 --- a/platformio/home/rpc/handlers/memusage.py +++ b/platformio/home/rpc/handlers/memusage.py @@ -32,7 +32,6 @@ class MemUsageRPC(BaseRPCHandler): await self.factory.manager.dispatcher["core.exec"]( ["run", "-d", project_dir, "-e", env, "-t", "__memusage"], options=options.get("exec"), - raise_exception=True, ) return memusage.list_reports(report_dir)[-1] diff --git a/platformio/home/rpc/handlers/project.py b/platformio/home/rpc/handlers/project.py index f8182ca5..3d2db397 100644 --- a/platformio/home/rpc/handlers/project.py +++ b/platformio/home/rpc/handlers/project.py @@ -65,7 +65,7 @@ class ProjectRPC(BaseRPCHandler): args.extend(self._pre_init_empty(configuration)) return await self.factory.manager.dispatcher["core.exec"]( - args, options=exec_options + args, options=exec_options, raise_exception=False ) @staticmethod