mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
silence the systemd/dbus exception if there are no matching services (#182)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user