From 394d66290d6a3589375f49bcafe032a3ef081f44 Mon Sep 17 00:00:00 2001 From: Anand Borkar <56469274+ghostviper235@users.noreply.github.com> Date: Fri, 8 Oct 2021 13:51:47 +0530 Subject: [PATCH] Use new format for logging exceptions - host/services.py (#3213) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Joakim Sørensen --- supervisor/host/services.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/supervisor/host/services.py b/supervisor/host/services.py index 1cb154902..a5a84748f 100644 --- a/supervisor/host/services.py +++ b/supervisor/host/services.py @@ -26,12 +26,12 @@ class ServiceManager(CoreSysAttributes): def _check_dbus(self, unit=None): """Check available dbus connection.""" if not self.sys_dbus.systemd.is_connected: - _LOGGER.error("No systemd D-Bus connection available") - raise HostNotSupportedError() + raise HostNotSupportedError( + "No systemd D-Bus connection available", _LOGGER.error + ) if unit and not self.exists(unit): - _LOGGER.error("Unit '%s' not found", unit) - raise HostServiceError() + raise HostServiceError(f"Unit '{unit}' not found", _LOGGER.error) def start(self, unit): """Start a service on host."""