diff options
author | Devaev Maxim <[email protected]> | 2019-05-10 20:41:10 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-05-10 20:41:10 +0300 |
commit | 3a4d79423e5f5f289eaea6a2ba426ef3c258f17b (patch) | |
tree | a8c997e05bec4f47cfbcea2bce54419ee0204a8f | |
parent | 80e6d2ec9c5571c8abd215d67d0da95c20d2ab2f (diff) |
info: report dbus errors
-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] = {} |