diff options
-rw-r--r-- | kvmd/apps/kvmd/info.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kvmd/apps/kvmd/info.py b/kvmd/apps/kvmd/info.py index a6f34e92..149d6405 100644 --- a/kvmd/apps/kvmd/info.py +++ b/kvmd/apps/kvmd/info.py @@ -28,6 +28,8 @@ from typing import Dict import dbus # pylint: disable=import-error import dbus.exceptions # pylint: disable=import-error +from ...logging import get_logger + from ...yamlconf.loader import load_yaml_file @@ -57,7 +59,8 @@ class InfoManager: get_unit_state = obj.get_dbus_method("GetUnitFileState", "org.freedesktop.systemd1.Manager") return (get_unit_state(daemon + ".service") in ["enabled", "enabled-runtime", "static", "indirect", "generated"]) - except dbus.exceptions.DBusException: + except dbus.exceptions.DBusException as err: + get_logger(0).error("Can't get services info: %s: %s", type(err).__name__, str(err)) is_enabled = (lambda daemon: True) extras: Dict[str, Dict] = {} |