refactoring

This commit is contained in:
Maxim Devaev
2024-09-18 04:37:43 +03:00
parent 45270a09d7
commit 7a53f14456
83 changed files with 517 additions and 516 deletions

View File

@@ -51,8 +51,8 @@ class SystemdUnitInfo:
unit_props = unit.get_interface("org.freedesktop.DBus.Properties")
started = ((await unit_props.call_get("org.freedesktop.systemd1.Unit", "ActiveState")).value == "active") # type: ignore
self.__requested = True
except dbus_next.errors.DBusError as err:
if err.type != "org.freedesktop.systemd1.NoSuchUnit":
except dbus_next.errors.DBusError as ex:
if ex.type != "org.freedesktop.systemd1.NoSuchUnit":
raise
started = False
enabled = ((await self.__manager.call_get_unit_file_state(name)) in [ # type: ignore