From b8e07620193b3c34ba5158a399c03e199f577ad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Thu, 30 Jan 2025 08:24:57 -0300 Subject: [PATCH] core: ardupilot_manager: AbstractRouter: Improve debug message with router name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- .../ardupilot_manager/mavlink_proxy/AbstractRouter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/services/ardupilot_manager/mavlink_proxy/AbstractRouter.py b/core/services/ardupilot_manager/mavlink_proxy/AbstractRouter.py index be08dba10b..9c86086462 100644 --- a/core/services/ardupilot_manager/mavlink_proxy/AbstractRouter.py +++ b/core/services/ardupilot_manager/mavlink_proxy/AbstractRouter.py @@ -109,7 +109,7 @@ async def start(self, master_endpoint: Endpoint) -> None: stderr = _strerr.decode("utf-8") if _strerr else "No stderr." output = f"message: stdout: '{stdout}', stderr: '{stderr}'" returncode = self._subprocess.returncode - raise MavlinkRouterStartFail(f"Failed to initialize Mavlink router, code: {returncode}, {output}") + raise MavlinkRouterStartFail(f"Failed to initialize {self.name()}, code: {returncode}, {output}") await self.start_house_keepers() async def exit(self) -> None: @@ -127,7 +127,7 @@ async def exit(self) -> None: await asyncio.sleep(3) await self._subprocess.wait() # Wait for the subprocess to terminate else: - logger.debug("Tried to stop router, but it was already not running.") + logger.debug(f"Tried to stop {self.name()}, but it was already not running.") async def start_house_keepers(self) -> None: if self._subprocess is None: @@ -158,7 +158,7 @@ async def _log_stderr(self) -> None: async def restart(self) -> None: if self._master_endpoint is None: - raise NoMasterMavlinkEndpoint("Mavlink master endpoint was not set. Cannot restart router.") + raise NoMasterMavlinkEndpoint(f"Mavlink master endpoint was not set. Cannot restart {self.name()}.") await self.exit() await self.start(self._master_endpoint)