From: Marcel van der Veldt Date: Sun, 7 Apr 2024 21:43:24 +0000 (+0200) Subject: prevent error in log X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=561be083c9decdd1245f89092139529c9d6e29fd;p=music-assistant-server.git prevent error in log --- diff --git a/music_assistant/server/providers/sonos/player.py b/music_assistant/server/providers/sonos/player.py index 711a1485..2bc23d47 100644 --- a/music_assistant/server/providers/sonos/player.py +++ b/music_assistant/server/providers/sonos/player.py @@ -535,7 +535,8 @@ class SonosPlayer: """Handle callback for topology change event.""" if xml := event.variables.get("zone_group_state"): zgs = ET.fromstring(xml) - if vanished_devices := zgs.find("VanishedDevices"): + vanished_devices = zgs.find("VanishedDevices") + if vanished_devices is not None: for vanished_device in vanished_devices: if (reason := vanished_device.get("Reason")) not in SUPPORTED_VANISH_REASONS: self.logger.debug(