From 60adccd549c3ec9c17e80e5c4cce90604b1c42f5 Mon Sep 17 00:00:00 2001 From: jjlawren Date: Thu, 2 Dec 2021 12:11:08 -0600 Subject: [PATCH] Do not print full traceback during Sonos resubscription failure (#60644) --- homeassistant/components/sonos/speaker.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/sonos/speaker.py b/homeassistant/components/sonos/speaker.py index a6a1ffc1fe4..4cec0fbb6ab 100644 --- a/homeassistant/components/sonos/speaker.py +++ b/homeassistant/components/sonos/speaker.py @@ -407,10 +407,12 @@ class SonosSpeaker: self.zone_name, ) else: + exc_info = exception if _LOGGER.isEnabledFor(logging.DEBUG) else None _LOGGER.error( - "Subscription renewals for %s failed", + "Subscription renewals for %s failed: %s", self.zone_name, - exc_info=exception, + exception, + exc_info=exc_info, ) await self.async_offline()