From 5045d8b3d70cc558908e8da479ee2664e7ab9c65 Mon Sep 17 00:00:00 2001 From: czo Date: Fri, 30 Aug 2024 18:30:31 +0200 Subject: [PATCH] silence the systemd/dbus exception if there are no matching services (#182) --- kvmd/apps/kvmd/sysunit.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kvmd/apps/kvmd/sysunit.py b/kvmd/apps/kvmd/sysunit.py index b967aa58..11207230 100644 --- a/kvmd/apps/kvmd/sysunit.py +++ b/kvmd/apps/kvmd/sysunit.py @@ -75,6 +75,10 @@ class SystemdUnitInfo: async def close(self) -> None: try: if self.__bus is not None: + try: + await self.__manager.call_get_default_target() + except: + pass self.__bus.disconnect() await self.__bus.wait_for_disconnect() except Exception: