From 621eb4c4c09828b10daf15f939e979163263cc6d Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Tue, 24 Nov 2020 14:18:00 +0100 Subject: [PATCH] Don't send DBusProgramError to sentry (#2294) * Don't send DBusProgramError to sentry * Add message --- supervisor/dbus/network/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supervisor/dbus/network/__init__.py b/supervisor/dbus/network/__init__.py index 54259bf7d..4b998e0d4 100644 --- a/supervisor/dbus/network/__init__.py +++ b/supervisor/dbus/network/__init__.py @@ -4,7 +4,7 @@ from typing import Any, Awaitable, Dict import sentry_sdk -from ...exceptions import DBusError, DBusInterfaceError +from ...exceptions import DBusError, DBusInterfaceError, DBusProgramError from ...utils.gdbus import DBus from ..const import ( DBUS_ATTR_CONNECTION_ENABLED, @@ -105,6 +105,9 @@ class NetworkManager(DBusInterface): # Connect to interface try: await interface.connect() + except DBusProgramError as err: + _LOGGER.warning("Can't process %s: %s", device, err) + continue except Exception as err: # pylint: disable=broad-except _LOGGER.exception("Error while processing interface: %s", err) sentry_sdk.capture_exception(err)