summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorczo <[email protected]>2024-08-30 18:30:31 +0200
committerGitHub <[email protected]>2024-08-30 19:30:31 +0300
commit5045d8b3d70cc558908e8da479ee2664e7ab9c65 (patch)
tree42b8ade37adb97c94eac6172473853c0d68d94b5
parentcc66fbf1dfe134f97567358b7c795efac162d1b8 (diff)
silence the systemd/dbus exception if there are no matching services (#182)
-rw-r--r--kvmd/apps/kvmd/sysunit.py4
1 files changed, 4 insertions, 0 deletions
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: